Bismillahi wal Hamdullillah Was Salaatu Was Salaatu ‘Alaa Rasoolillahi:
Upon the authority of Abdullah ibn Amr – Radhiyallahu ‘Anhumaa who said: “A man who was born in Madina passed away in Madina, so the prophet – Sallallahu alaihi was Salam prayed over him then said: “If only he had passed away in other than his place of birth” so a man from the people said: “And why is that Oh Messenger of Allah? he said: “Indeed if a man dies in other than his place of birth, he will have the distance between his place of birth and his place of passing away measured out for him in jannah“
(Collected by Ibn Hibban:(2923) and Ibn Maajah (1614) and declared ‘Hasan’ by Shaikh Albaani)
Imaamus Sindhi clarifies that the messenger did not intend by his statement “If only he passed away in other than his place of birth” that it would be better for him to die in other than Madina, since the virtue of dying in Madina is established. Rather as As Sindhi states: “Perhaps he intended by his statement concerning dying in other than Madina, if only he was a stranger and one who had migrated to Madina..”
(Haashiyatus Sindhi ‘Alaa Sunan Ibn Maajah 3/387)
That is, it would have been better for him had he been one that had migrated to Madina and died in it.
A great virtue for one who dies outside of their place of birth, either due to migration or journey.
Wallahu Ta’ala A’lam