Full Sharh — Mishkat al-Masabih 1512
وَعَن عبد الله بن عَمْرو قَالَ ك تُوُفِّيَ رَجُلٌ بِالْمَدِينَةِ مِمَّنْ وُلِدَ بِهَا فَصَلَّى عَلَيْهِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ: «يَا لَيْتَهُ مَاتَ بِغَيْرِ مَوْلِدِهِ» . قَالُوا وَلِمَ ذَاكَ يَا رَسُولَ اللَّهِ؟ قَالَ: «إِنَّ الرَّجُلَ إِذَا مَاتَ بِغَيْرِ مَوْلِدِهِ قِيسَ لَهُ مِنْ مَوْلِدِهِ إِلَى مُنْقَطَعِ أَثَرِهِ فِي الْجَنَّةِ» . رَوَاهُ النَّسَائِيّ وَابْن مَاجَه
English Translation
‘Abdallah b. ‘Amr said that when a man who had been born in Medina died there, the Prophet prayed at his funeral and said, “Would that he had died somewhere else than in his birthplace!” On being asked why he had said that he replied, “When a man dies somewhere else than in his birthplace a space will be measured for him in paradise equal to the distance between his birthplace and the place where he died.” Nasa’I and Ibn Majah transmitted it.
Source
Mishkat al-Masabih(مشكاة المصابيح)
Funerals
Hadith Number
1512