Scholar Ibn al-Qayyim (rahimahullah) said: "He who compares the practice of the Messenger (salallahu alaihe wa-sallam) and his commands and prohibitions with regards to graves, and the practice of his Companions with the rituals that people practice today, he can see the two sides of comparison are too contradictory and opposed to one another that they can never be reconciled. The Messenger of Allah (salallahu alaihe wa-sallam) forbade performing Salaat while facing graves, but people today do so. And he forbade including graves in mosques, and people today construct mosques around them and call them places for ritual visitation in opposition to the houses of Allah. And he forbade lighting candles on graves, and people today do so, and assign properties as endowment for this particular purpose. And he forbade making tombs as places for ritual celebrations, and people do so just as they celebrate Eid or even more. He ordered leveling graves according to the following Hadeeth in which Ali said to Abul-Hayyaj al-Asadi: "Shall I charge you with a duty which the Prophet (salallahu alaihe wa-sallam) charged me with? Destroy every idol or statue and level down every raised grave." [Saheeh Muslim]
The Prophet (salallahu alaihe wa-sallam) also forbade plastering graves, sitting on them, or erecting structures on them, or to include it in a structure" [Saheeh Muslim]
Abu Thumamah Ibn Shufay reported: "We were with Fudalah Ibn Ubaid in Rhodes, when a man in our group died and Fudalah ordered that his grave be leveled with the ground, and said: 'I heard the Messenger of Allah (salallahu alaihe wa-sallam) commanding leveling graves.'"
And people today vehemently oppose these two traditions and raise graves above ground level like houses, and build domes above them. Ibn al-Qayyim went on to say: "Consider this great contradiction between what the Prophet (salallahu alaihe wa-sallam) legislated and intended in prohibiting the above mentioned practices, and what people of today legislate and intend."
There is no doubt that the wrong things and improper doings mentioned above are conducive to unlimited evil. Ibn al-Qayyim then enumerated those wrong doings saying: "What the Prophet (salallahu alaihe wa-sallam) allowed while visiting graves is to remember the Hereafter, supplicate Allah in favor of the dead people, and ask Allah to forgive them, and be merciful to them, and save them from punishment. In that case, the visitor would do a favor for himself and for the dead. But the polytheists of today, do the opposite thing, that is; supplicating the dead instead of supplicating Allah, asking them to fulfill their needs, grant them blessings, and aid them against their enemies. By doing so, they, in fact, wrong themselves and the dead too, by depriving him of what Allah has made legal of supplication in favor of the dead and asking Allah's mercy for them." [Ibn al-Qayyim, Ighathat al-Lahfan, vol.1, p.214, 215 and 217]
From the before-mentioned, it is clear that making offerings and sacrifices to dead people constitutes major Shirk, because they contradict the guidance of Muhammad (salallahu alaihe wa-sallam) with regards to graves, which prohibits erecting them, or building mosques on them. Since mosques, chambers and domes are constructed on graves, ignorant people think that the entombed people can extend benefit and cause harm, offer relief to those who are seeking it, and fulfill the needs of those who resign to them. Consequently, they offer them sacrificial animals and make vows to them, to the point that they are turned into idols, worshipped to the exclusion of Allah.
The Prophet (salallahu alaihe wa-sallam) said: "O Allah! Let not my grave be turned into a worshipped idol." [Malik and Ahmed]
The Prophet (salallahu alaihe wa-sallam) made such supplication to Allah knowing, perhaps that a thing of this nature will take place in other than his own grave, which is happening in many Muslim countries.
As for his grave, Allah has guarded it from turning into an idol, as a result of the blessing of his Du'aa or supplication. Although some ignorant superstitious people commit some improper practices in his Masjid, but they cannot reach his grave because his grave is in his house, not in the Masjid, and surrounded by walls, as scholar Ibn al-Qayyim described in his poem in which he said:
"And the Rubb of the worlds has responded to his supplication and surround it with three walls.