All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
It was the Christians of Andalusia who tried to dig up the grave of the Prophet and remove his body; this happened in 557 A.H. This is what the author of The History of the Features of Madeenah stated and he reported this from many historians.
The person who thwarted this evil plot was the martyr Sultan Noor-Ad-Deen Mahmood Zinki, the Egyptian Mamlook (Mameluke), who saw in his dream that the Prophet told him: "Rescue me from these two men", while pointing to two blond men.
Therefore, the Sultan immediately headed to Madeenah as he expected that some trouble was brewing there. He looked for the two men until he found and arrested them. They informed him that they were sent by the Christians of Andalusia, and they were disguised as Moroccan pilgrims. They stayed next to the grave of the Prophet and started digging secretly until they had nearly reached his grave. Therefore, the Sultan executed them. Then, he dug a very deep hole around the grave of the Prophet and filled it with melted lead so that nobody would attempt to dig his grave again.
The author of The History of the Features of Madeenah also stated an attempt to move the body of the Prophet and the bodies of his two Companions [Abu Bakr and 'Umar] to Egypt. This time it was Al-'Ubaydi the Egyptian ruler who attempted this, with the help and supervision of the governor of Madeenah at that time, but Allaah The Almighty protected His Prophet and his two Companions from this conspiracy.
Allaah Knows best.