Intercession on the Day of Judgement
Question

What is intercession (shafa'ah)? Are there different kinds of intercession? Will people intercede or only the prophets? Are there any people whose intercession will not be accepted?
Praise be to Allah.When the distress becomes too great for the people on the Day of Judgement and they have stood for too long, suffering in the heat and terror and distress, the Prophet (peace and blessings of Allah be upon him) says, “How will you be when Allah gathers you together like arrows in a quiver, for fifty thousand years, during which Allah will not look at you?” (Al-Silsilah Al-Sahihah, 2817). 
The people will look to those who are of high status to intercede for them with their Lord so that He might relieve them of this distress that they are suffering and come to pass judgement amongst them. 
So they will come to Adam, but he will excuse himself; then they will come to Nuh, but he will excuse himself; then they will come to Ibrahim, but he will excuse himself; then they will come to Musa, but he will excuse himself; then they will come to ‘Isa, but he will excuse himself. Then they will come to our Prophet (peace and blessings of Allah be upon him) and he will say, “I am fit for that.” So he will intercede for the people in the place of gathering, so that judgement may be passed. This is the station of praise and glory which Allah has promised to him, as He says (interpretation of the meaning): 
“It may be that your Lord will raise you to Maqam Mahmud (a station of praise and glory, i.e., the honour of intercession on the Day of Resurrection)” [Al-Isra 17:79] 
Hadith on intercession
There follows the lengthy hadith about intercession : 
It was narrated that Anas ibn Malik said: Muhammad (peace and blessings of Allah be upon him) told us: “When the Day of Resurrection comes, the people will surge with each other like waves. They will come to Adam and say, ‘Intercede for us with your Lord.’ He will say, ‘I am not fit for that. Go to Ibrahim for he is the Close Friend of the Most Merciful.’ So they will go to Ibrahim, but he will say, ‘I am not fit for that. Go to Musa for he is the one to whom Allah spoke directly.’ So they will go to Musa but he will say, ‘I am not fit for that. Go to ‘Isa for he is a soul created by Allah and His Word.’ So they will go to ‘Isa but he will say, ‘I am not fit for that. Go to Muhammad (peace and blessings of Allah be upon him).’ So they will come to me and I will say, I am fit for that.’ Then I will ask my Lord for permission and He will give me permission, and He will inspire me with words of praise with which I will praise Him, words that I do not know now. So I will praise Him with those words of praise and I will prostrate before Him. He will say, ‘O Muhammad, raise your head. Speak and intercession will be granted to you, ask and you will be given, intercede and your intercession will be accepted.’ I will say, ‘O Lord, my ummah, my ummah!’ He will say, ‘Go and bring forth everyone in whose heart there is faith the weight of a barley-grain.’ So I will go and do that. Then I will come back and praise Him with those words of praise and I will fall prostrate before Him. He will say, ‘O Muhammad, raise your head. Speak and intercession will be granted to you, ask and you will be given, intercede and your intercession will be accepted.’ I will say, ‘O Lord, my ummah, my ummah!’ He will say, ‘Go and bring forth everyone in whose heart there is faith the weight of a small ant or a mustard-seed.’ So I will go and do that. Then I will come back and praise Him with those words of praise and I will fall prostrate before Him. He will say, ‘O Muhammad, raise your head. Speak and intercession will be granted to you, ask and you will be given, intercede and your intercession will be accepted.’ I will say, ‘O Lord, my ummah, my ummah!’ He will say, ‘Go and bring forth from the Fire everyone in whose heart there is faith the weight of the lightest, lightest grain of mustard-seed.’ So I will go and bring them forth.”  
When we left Anas I [the narrator of the hadith] said to some of our companions, “Why don’t we go to al-Hasan, who is hiding in the house of Abu Khalifah, and tell him what Anas ibn Malik has told us?” So we went to him, greeted him with salam and he gave us permission to enter. Then we said, “O Abu Sa’id, we have come to you from your brother Anas ibn Malik, and we have never heard anything like what he narrated to us about intercession.” He said, “Tell me.” So we narrated the hadith to him and we came to this point and he said, “Keep going.” We said, “He did not tell us any more.”  He said, “He told me this hadith when he was a young man, twenty years ago. I do not know if he forgot or if he did not want to let you depend on what he might have said. We said, “O Abu Sa’id, tell us.” He smiled and said, “ Man was created hasty. I only mentioned that because I wanted to inform you of it. Anas told me the same as he told you, and said that the Prophet (peace and blessings of Allah be upon him) added: “Then I will come back a fourth time and praise Him with those words of praise and I will fall prostrate before Him. He will say, ‘O Muhammad, raise your head. Speak and intercession will be granted to you, ask and you will be given, intercede and your intercession will be accepted.’ I will say, ‘O Lord, give me permission (to bring forth) all those who said La ilaha ill-Allah.’ He will say, ‘By My Might, My Majesty, My Supremacy and My Greatness, I will most certainly bring forth from it those who said La ilaha ill-Allah.’” (Narrated by Al-Bukhari, 7510) 
It was narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “I will be the leader of mankind on the Day of Resurrection. Do you know why that is? Allah will gather mankind, the first and the last of them, in one place, so that the caller will be able to make them all hear his voice and the watcher will be able to see them all. The sun will be brought close and the people will suffer such distress and trouble that they will not be able to bear it or stand it. The people will say, ‘Don't you see in the state you are in and the condition you have reached? Why don't you look for someone who can intercede for you with your Lord?’ The people will say to one another: ‘Go to your father, Adam.’ So they will go to Adam (peace be upon him) … I will go and prostrate beneath the Throne. Then I will be given words of praise that have never been given to anyone before me, then it will be said, ‘O Muhammad! Raise your head; ask, for it will be given to you, and intercede, for your intercession will be accepted.’ I will raise my head and say, ‘My ummah, O lord! My ummah, O Lord!’ It will be said, ‘O Muhammad, admit from among your ummah those who will not be brought to account from the right-hand gate of Paradise, and they will share the other gates with the people.’ He said, By the One in Whose Hand is my soul, the distance between two of the gate-posts is like the distance between Makkah and Humayr, or between Makkah and Busra.” (Narrated by al-Bukhari, 4712) 
This is the great intercession in the place of standing, and it is intercession so that judgement may be passed. 
Type of intercession on the Day of Judgement
Intercession on the Day of Resurrection is of two types : 

Intercession which will be accepted. This is intercession which is proven in the texts of shari’ah. More details will be given below. 
Intercession which will be rejected. This is intercession which according to the texts of the Quran and Sunnah is invalid and ineffective, as we shall see below. 

Types of accepted intercession
Accepted intercession is of various types: 

The greatest intercession, which is al-maqam al-mahmud, which the earlier and later generations will ask the Prophet (peace and blessings of Allah be upon him) to intercede for them with their Lord so that He might relieve them of the horrors of the Day of Judgement. This has been explained above.
Intercession for those among the monotheists who committed major sins and entered Hell, that they may be brought forth from it. It was narrated that Anas said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “My intercession will be for those among my ummah who committed major sins.” (Sahih Sunan al-Tirmidhi, 1983).
The intercession of the Messenger for people whose good deeds and bad deeds are equal, that they may enter Paradise, and for others who had been ordered to Hell, that they may not enter it.
Intercession that some people may enter Paradise without being brought to account.
Intercession of the Prophet (peace and blessings of Allah be upon him) for his paternal uncle Abu Talib, so that the torment of the Fire be reduced for him. This applies only in the case of the Prophet (peace and blessings of Allah be upon him) and his paternal uncle Abu Talib.
The intercession of the Prophet (peace and blessings of Allah be upon him) that the believers might be granted permission to enter Paradise. 

Intercession for those who committed sin will not be granted only to the Prophet (peace and blessings of Allah be upon him), rather the prophets, the martyrs, the scholars, the righteous and the angels will also join in that. A man’s righteous deeds may also intercede for him. But the Prophet (peace and blessings of Allah be upon him) will have the greatest share of intercession. 
Intercession of prophets and others
There follows a hadith which indicates that intercession will be granted to the prophets and others. It was narrated that Abu Sa’id al-Khudri said: “We said, ‘O Messenger of Allah, will we see our Lord on the Day of Resurrection?’” … and he quoted the hadith, until he came to the part which describes how the believers will pass across the Sirat and will intercede for their brothers who have entered Hell: “They will say, ‘O Lord, our brothers used to pray with us and fast with us and do good deeds with us.’ Allah will say, ‘Go, and whoever you find with a dinar’s-weight of faith in his heart, bring him forth, and Allah will forbid their bodies to the Fire.’ So they will go, and some of them will be sinking into the Fire up to their feet or shins, and they will bring forth those whom they recognize. Then they will come back, and He will say, ‘Go, and whoever you find with half a dinar’s-weight of faith in his heart, bring him forth.’ So they will go and bring forth those whom they recognize. Then they will come back, and He will say, ‘Go, and whoever you find with an atom’s-weight of faith in his heart, bring him forth.’ So they will go and bring forth those whom they recognize.” Abu Sa’id said: “If you do not believe me, then read the verse interpretation of the meaning): 
‘Surely, Allah wrongs not even the weight of an atom (or a small ant), but if there is any good (done), He doubles it, and gives from Him a great reward’ [Al-Nisa 4:40].” 
[The Prophet (peace and blessings of Allah be upon him) said:] “So the prophets, the angels and the believers will intercede, and the Compeller (Allah) will say, ‘There remains My intercession.’ Then He will take a handful from the Fire and bring forth some people whose bodies have been burnt and throw them into a river at the entrance to Paradise that is called the Water of Life.  
They will grow on its banks, as a seed carried by a flood grows. You have seen how it grows beside a rock or beside a tree, and how the side facing the sun is usually green while the side facing the shade is white. They will come out like pearls, and necklaces will be placed around their necks. Then they will enter Paradise, and the people of Paradise will say, ‘These are the people emancipated by the Most Merciful. He has admitted them into Paradise without them having done any good deeds and without them having sent forth any good (for themselves).’ Then it will be said to them, ‘You will have what you have seen and the equivalent thereof.’” (Narrated by al-Bukhari, 7440) 
Conditions of intercession of the Day of Judgement
Intercession of the Day of Resurrection will only be granted if three conditions are met, as indicated in the verses (interpretation of the meaning):
“And there are many angels in the heavens, whose intercession will avail nothing except after Allah has given leave for whom He wills and is pleased with” [Al-Najm 53:26] 
“On that day no intercession shall avail, except the one for whom the Most Gracious (Allah) has given permission and whose word is acceptable to Him” [Ta-Ha 20:109]
“He knows what is before them, and what is behind them, and they cannot intercede except for him with whom He is pleased. And they stand in awe for fear of Him” [Al-Anbiya 21:28] 
“Who is he that can intercede with Him except with His Permission?” [Al-Baqarah 2:255]
These conditions are: 

The permission of Allah to the intercessor to intercede.
Allah’s being pleased with the intercessor.
His being pleased with the one for whom intercession is made.

It was narrated from the Prophet (peace and blessings of Allah be upon him) that the intercession of some people will not be accepted on the Day of Resurrection, including those who cursed a great deal. Muslim narrated that Abu’l-Darda said: “I heard the Messenger of Allah (peace and blessings of Allah be upon him) say, ‘Those who curse will not be witnesses or intercessors on the Day of Resurrection.” 
Types of rejected intercession
With regard to the kind of intercession that will be rejected, this is intercession that does not meet the conditions required of permission from Allah or His being pleased (with the intercessor or the one for whom intercession is made), such as the intercession which the people of shirk believe that their gods will achieve. They only worship them because they believe that they will intercede for them with Allah, and that they are mediators or intermediaries between them and Allah. Allah says (interpretation of the meaning): 
“Surely, the religion (i.e. the worship and the obedience) is for Allah only. And those who take Awliya (protectors, helpers, lords, gods) besides Him (say): ‘We worship them only so that they may bring us near to Allah.’ Verily, Allah will judge between them concerning that wherein they differ. Truly, Allah guides not him who is a liar, and a disbeliever” [Al-Zumar 39:3] 
Allah tells us that this kind of intercession is ineffective and of no benefit, as He says (interpretation of the meaning): 
“So no intercession of intercessors will be of any use to them” [Al-Muddaththir 74:48] 
“And fear a Day (of Judgement) when a person shall not avail another, nor will intercession be accepted from him nor will compensation be taken from him nor will they be helped” [Al-Baqarah 2:48] 
“And fear the Day (of Judgement) when no person shall avail another, nor shall compensation be accepted from him, nor shall intercession be of use to him, nor shall they be helped” [Al-Baqarah 2:123] 
“O you who believe! Spend of that with which We have provided for you, before a Day comes when there will be no bargaining, nor friendship, nor intercession. And it is the disbelievers who are the Zalimun (wrongdoers)” [Al-Baqarah 2:254]
Hence Allah did not accept the intercession of His Close Friend Ibrahim for his father Azar who was a mushrik. It was narrated from Abu Hurayrah that the Prophet (peace and blessings of Allah be upon him) said: “Ibrahim will meet his father on the Day of Resurrection, and Azar’s face will be dark and covered with dust. Ibrahim will say to him, ‘Did I not tell you not to disobey me?’ His father will say, ‘Today I will not disobey you.'’ Ibrahim will say, ‘O Lord! You promised me not to disgrace me on the Day of Resurrection; and what will be more disgraceful to me than cursing and dishonoring my father?’ Then Allah will say, ‘I have forbidden Paradise to the disbelievers.’ Then he will be addressed, ‘O Ibrahim, what is beneath your feet?’ He will look and there he will see a Dhabh (an animal,) blood-stained, which will be caught by the legs and thrown into the Fire.” (Narrated by al-Bukhari, 3350).
For more, please see these answers: 196054 , 42, and 220340 .
And Allah knows best.