[1] Jundub Ibn ‘Abdullaah al-Bajalee said that he heard the Prophet (sallallaahu ‘alayhi wa sallam) say - five days before he died: "Verily those before you took the graves of their Prophets and righteous people as places of worship, so do not take the graves as places of worship. Indeed I forbid you from this!" Muslim (2/67-68), Aboo ‘Awaanah (1/104) and others
[2] From Aboo Hurayrah that the Messenger of Allaah (sallallaahu ‘alayhi wa sallam) said: "O Allaah, do not turn my grave into an idol. May the curse of Allaah be upon those who take the graves of their Prophets as places of worship." Ahmad (no. 7352), Ibn Sa‘d (2/241-242) and others.
[3] 'Abdullaah Ibn Sharjeel Hasanah said: "I saw ‘Uthmaan Ibn ‘Affaan order the leveling of the graves. So it was said to him: 'This is the grave of Umm ‘Amr the daughter of ‘Uthmaan!' However, he commanded that it too should be leveled." Ibn Abee Shaybah in al-Musannaf (4/138) and Aboo Zur‘ah in at-Taareekh (22/2)
[4] From Abul-Hayyaaj al-Asadee who said: "‘Alee Ibn Abee Taalib said to me: 'Shall I not send you for what the Messenger of Allaah (sallallaahu ‘alayhi wa sallam) sent me? That you deface all statues and pictures and that you level all elevated graves.'" Muslim (3/61), Aboo Daawood (3/70), an-Nisaa‘ee (1/285) and others.
[5] Aboo Burdah said: "Aboo Moosaa al-Ash‘aree advised us before he died, saying: 'You should hasten with my janaazah…and do not put in my lahad (a cleavage in the side of the grave where the body is placed) anything that will come between me and the earth, nor build anything over my grave. So bear witness that I am free of those women who shave their heads, tear their clothes or beat their cheeks.' They said: 'Did you hear anything about this?' He said: 'Yes, from the Messenger of Allaah (sallallaahu ‘alayhi wa sallam)!'" Ahmad (4/397)
Imaam ibn Hajr al-Haythami al-Makki (d.794H)
Kitaab az-Zawaajir
The biggest means for shirk is praying near graves and making them into places of worship. It is obligatory to eliminate the prohibited actions that occur at graves and tombs and as for the tombs and shrines that have been erected over graves then they should be destroyed as quickly as possible because the Messenger of Allaah (sall-Allaahu ‘alayhi wa Sallam) forbade this and ordered the levelling of graves. Hence all forms of lights, candles and others should be abolished, and it is not correct to offer sacrifices and vows at such places. Lighting candles on the graves, making them into idols, making tawaaf of them and pryaing towards them are all major sins…
*How Allah (swt) protected the grave of RasulAllah (saw) in return for an answer to his prayer from becoming a direction of prayer
Qurtubî
al-Mufhim lima Ashkal min Talkis Kitab Muslim II,128**
Therefore, the Muslims went to great lengths to block the tendency to do so at the grave of RasulAlalh (saw). They raised the dirt walls around it high, completely surrounding it and blocking off the entrances to it. Then they feared that the location of his grave might be turned into a direction for prayer, because it was in the direction the worshippers face and some of them might get the idea that facing it was an act of worship. For this reason, they built two walls at the northern corners of the grave and placed them at a slant so that they would form a triangle with on of its corners pointing to the North. In this way, no one could be able to directly face the grave while making his prayer.
“O Allah! Do not let my grave become an idol that people worship.” (Al-Muwatta; Ahmad; Ibn Sa‘d and others)