It is narrated from Sayyiduna Hudhayfah bin al-Yaman (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The superiority of a house near the mosque over a house far away is like the superiority of the warrior who fights in jihad over the one who stays sitting at home." This hadith is da'if (weak), and along with its weakness it also contradicts the authentic narrations reported in the two Sahihs and other books of hadith from Sayyiduna Abu Musa al-Ash'ari (may Allah be pleased with him), that the Messenger of Allah (peace and blessings be upon him) said: "The greatest of people in reward for the prayer is the one who walks to it from the farthest distance, then the one who is next farthest." Likewise, Imam Muslim in his Sahih and other hadith scholars narrated from Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) that some plots of land around the mosque became vacant, and Banu Salimah intended to move there. When this news reached the Prophet (peace and blessings be upon him), he (peace and blessings be upon him) said to them: "I have learned that you want to move near the mosque?" They said: Yes, O Messenger of Allah! That is what we intended. He (peace and blessings be upon him) said: "O Banu Salimah! Stay in your own houses; your footsteps are recorded (as a source of reward). Stay in your own houses; your footsteps are written down." So the Companions said that after that, moving from there no longer pleased them. Also, Imam Ahmad, Abu Dawud, Ibn Majah and al-Hakim (who also declared it sahih) narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "The farther one is from the mosque, the greater the reward he will receive." And the hadith on this subject are very numerous.
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب المساجد / 1033
Hadith Gradingمحدثین:إسناده ضعيف
Hadith Takhrij«هذا حديث ضعيف، ومع ضعفه مخالف لما في الصحيحين وغيرهما من حديث أبي موسى الأشعري قال: قال رسول الله صلى الله عليه وسلم إن أعظم الناس أجرا في الصلاة أبعدهم إليها ممشى، فأبعدهم» «(1033/1) أخرجه مسند أحمد برقم: 22876» «(1033/3) أخرجه صحيح البخاري برقم: 623، وأخرجه صحيح مسلم برقم: 662، 665، وأخرجه مسند البزار برقم: 3166، وأخرجه رياض الصالحين برقم: 1100، 150، 1099، وأخرجه السنن الصغير للبيهقي برقم: 476، وأخرجه مسند أحمد برقم: 14156، 14574، 14772، وأخرجه فتح الباري برقم: 1788، وأخرجه صحيح ابن خزيمة برقم: 451، وأخرجه شرح السنة برقم: 469، وأخرجه سنن أبي داود برقم: 556، وأخرجه سنن ابن ماجه برقم: 782، وأخرجه المستدرك على الصحيحين برقم: 780، وأخرجه البحر الزخار المعروف بمسند البزار 10 - 18 برقم: 8285»