The farthest walk, the greatest reward

Those who walk the farthest to the masjid get the greatest reward.

Narrated by Abu Musa al-Ash'ari

The people who receive the greatest reward for prayer are those who walk the farthest to it, and then those who walk the next farthest. And the one who waits for the prayer to pray it with the imam has a greater reward than the one who prays it and then sleeps.

Sahih al-Bukhari 651, Sahih Muslim 662

What this hadith teaches

Living far from the masjid is no reason to stay away; every extra step is extra reward.

Reference and grade

Grade
Sahih: agreed upon by al-Bukhari and Muslim
Narrator
Abu Musa al-Ash'ari
Chapter
The masjid

The hadith in Arabic نص الحديث

أَعْظَمُ النَّاسِ أَجْرًا فِي الصَّلاَةِ أَبْعَدُهُمْ فَأَبْعَدُهُمْ مَمْشًى، وَالَّذِي يَنْتَظِرُ الصَّلاَةَ حَتَّى يُصَلِّيَهَا مَعَ الإِمَامِ أَعْظَمُ أَجْرًا مِنَ الَّذِي يُصَلِّي ثُمَّ يَنَامُ

Arabic text of Sahih al-Bukhari 651, as given on sunnah.com.