Ruling on seeking intercession from the Prophet (blessings and peace of Allah be upon him)
Question

Many people say “Ash-shafaa‘ah ya Muhammad (intercession, O Muhammad.” Is this is shirk?
Praise be to Allah.Seeking intercession from the Prophet (blessings and peace of Allah be upon him) or anyone else among the dead is not permissible, and it constitutes major shirk according to the scholars, because after he (blessings and peace of Allah be upon him) died, he has no power to do anything, and Allah says (interpretation of the meaning):
“Say: All intercession belongs to Allah alone [and no one can intercede except by His leave]”
[az-Zumar 39:44].
So intercession is under the control of Allah, may He be glorified and exalted, and neither the Prophet (blessings and peace of Allah be upon him) nor anyone else among the dead has any power after death to intercede, offer supplication or do anything else. When a person dies, all his deeds come to an end except three: ongoing charity (sadaqah jaariyah), beneficial knowledge, or a righteous child who will pray for him. Rather what was narrated is that salutations of blessing and peace will be conveyed to him (blessings and peace of Allah be upon him), hence he said: “Send blessings upon me, for your blessings will reach me no matter where you are.”
With regard to the hadith which says that deeds will be shown to him, and whatever he finds of goodness in them, he will praise Allah for it, and whatever he finds in them of evil, he will pray for forgiveness for us, this is a da‘eef (weak) hadith that has not been soundly narrated from the Prophet (blessings and peace of Allah be upon him). Even if it were soundly narrated, there is nothing in it to indicate that we may ask him for intercession.
The point is that seeking intercession from the Prophet (blessings and peace of Allah be upon him) or from anyone else among the dead is something that is not permissible, and according to Islamic teachings it comes under the heading of major shirk, because it is seeking from the dead person something that he has no power to do, like asking him for healing of the sick, or for victory over one’s enemies, or to help those who are faced with distress, and so on. All of these are types of major shirk, and there is no difference between seeking that from the Prophet (blessings and peace of Allah be upon him) or from Shaykh ‘Abd al-Qaadir, or from anyone else, or from al-Badawi or from al-Husayn, and so on. Seeking this from the dead is something that is not permissible, and it is one of the categories of shirk.
Rather we may pray for mercy for the deceased, if he was Muslim, and pray for forgiveness and mercy for him. In the case of the Prophet (blessings and peace of Allah be upon him), if a Muslim sends greetings of salaam to him, he (blessings and peace of Allah be upon him) prays for him. But if he asks him for aid or intercession or support against his enemies, all of that is not permitted, and these are actions that were done by the people of Jaahiliyyah and the people of shirk. The Muslim must be careful about this matter and avoid such things. End quote.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him).
Fataawa Noor ‘ala ad-Darb (1/392)