It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: The farther a person comes from to the mosque, the greater is his reward.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 9531
Hadith Gradingحکم دارالسلام:حسن لغیرہ ، وھذا إسناد ضعیف لجھالة عبد الرحمن بن مھران