Answered by Shaykh Amjad Rasheed
Is it permissible to move a dead body from the town where he died to another so he may be buried there?
The most correct position in our school is that it is haram to move a dead body from the town of his death to another town to bury him, even if it [s. the body] does not decompose by the time it takes to move it, or even if he had decreed it by will. [The reason] is that it comprises delaying the burial and exposing the body to having its sanctity disgraced.
Imam al-Nawawi said in the Majmu`,
“It has been correctly related from Jabir, may Allah be well pleased with him that he said, We were carrying our dead on the day of Uhud to bury them, so the crier of the Prophet, peace and blessings be upon him, came and he said, Verily the Messenger of Allah, peace and blessings be upon him is commanding you to bury the dead where they died,’ so we returned them.'” Related by Abu Dawud, al-Tirmidhi and al-Nasa’i by authentic chains. Al-Tirmidhi said, “it is a sound and authentic hadith.”
However, the prohibition is excused if the dead body is close to Mecca or Medina or Jerusalem, for it is permissible to move it there. Imam al-Shafi’i explicitly mentioned this , may Allah be well pleased with him and have mercy on him, as has come in the Minhaj, and Imam al Muhabb al-Tabari also added to these three blessed places, any village in which there are righteous people.”
The opposite of this more sound position [which is also permissible to follow] in the Majmu` is that moving the dead body is disliked and not haram. This position was chosen by Imam al-Baghawi and Shaykh Abu Nasr al Bandanayji who are from amongst our greatest scholars, who said, “Because a proof has not come about its prohibition”, as mentioned in the Mughni (1/366).
(Translated by Sr. Shazia Ahmad)