حَدَّثَنَا حَرْمَلَةُ بْنُ يَحْيَى، قَالَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ وَهْبٍ، حَدَّثَنِي حُيَىُّ بْنُ عَبْدِ اللَّهِ الْمَعَافِرِيُّ، عَنْ أَبِي عَبْدِ الرَّحْمَنِ الْحُبُلِيِّ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، قَالَ تُوُفِّيَ رَجُلٌ بِالْمَدِينَةِ مِمَّنْ وُلِدَ بِالْمَدِينَةِ فَصَلَّى عَلَيْهِ النَّبِيُّ ـ صلى الله عليه وسلم ـ فَقَالَ ‏"‏ يَا لَيْتَهُ مَاتَ فِي غَيْرِ مَوْلِدِهِ ‏"‏ ‏.‏ فَقَالَ رَجُلٌ مِنَ النَّاسِ وَلِمَ يَا رَسُولَ اللَّهِ قَالَ ‏"‏ إِنَّ الرَّجُلَ إِذَا مَاتَ فِي غَيْرِ مَوْلِدِهِ قِيسَ لَهُ مِنْ مَوْلِدِهِ إِلَى مُنْقَطَعِ أَثَرِهِ فِي الْجَنَّةِ ‏"‏ ‏.‏

It wasnarrated that ‘Abdullah bin ‘Amr said: “A man died inAl-Madinah, and he was one of those who were born in Al-Madinah. TheProphet (PBUH) offered the funeral prayer for him and said: “Wouldthathe had died somewhere other than his birthplace.” A man amongthepeople said: “Why, O Messenger of Allah?” He said: “If aman diessomewhere other than his birthplace, a space will bemeasured for himin Paradise (as big as the distance) from the placewhere he was bornto the place where he died.” Translation Not Available

Book Ref: Sunan Ibn Majah Book 6 Hadith 1614
Web Ref:  Sunan Ibn Majah Vol 1 Book 6 Hadith 1614