It is narrated from Ibn Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him), Abu Bakr, Umar, and Uthman (may Allah be pleased with them) used to walk in front of the funeral procession.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 577
Hadith Takhrijصحیح اخرجه ابوداود، الجنائز، باب المشى امام الخبازة (3179) ۔ والترمذى، الجنائز، باب ماجاء في المشى امام الجنازة (1007) ، (1008)۔