Abbas - Tanwîr al-Miqbâs min Tafsîr Ibn ‘Abbâs
(And never (O Muhammad) pray for one of them who dieth) i.e. any of the hypocrites after the death of 'Abdullah Ibn Ubayy, (nor stand by his grave. Lo! they disbelieved in Allah and His messenger) in secret, (and they died while they were evil-doers) hypocrites.
When the Prophet (s) prayed over [the dead body of ‘Abd Allāh] Ibn Ubayy, the following was revealed: And never pray over any one of them when he is dead, nor stand over his grave, at a burial or as a visit; lo! they disbelieved in God and His Messenger, and died while they were wicked, [they died] disbelieving.
The Prohibition of Prayer for the Funeral of Hypocrites
Allah commands His Messenger to disown the hypocrites, to abstain from praying the funeral prayer when any of them dies, from standing next to his grave to seek Allah's forgiveness for him, or to invoke Allah for his benefit. This is because hypocrites disbelieved in Allah and His Messenger and died as such. This ruling applies to all those who are known to be hypocrites, even though it was revealed about the specific case of `Abdullah bin Ubayy bin Salul, the chief hypocrite. Al-Bukhari recorded that Ibn `Umar said, "When `Abdullah bin Ubayy died, his son, `Abdullah bin `Abdullah, came to the Messenger of Allah and asked him to give him his shirt to shroud his father in, and the Messenger did that. He also asked that the Prophet offer his father's funeral prayer, and Allah's Messenger stood up to offer the funeral prayer. `Umar took hold of the Prophet's robe and said, `O Allah's Messenger! Are you going to offer his funeral prayer even though your Lord has forbidden you to do so' Allah's Messenger said,
(And never (O Muhammad) pray (funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave.)'' `Umar bin Al-Khattab narrated a similar narration. In this narration, `Umar said, "The Prophet offered his funeral prayer, walked with the funeral procession and stood on his grave until he was buried. I was amazed at my daring to talk like this to the Messenger of Allah, while Allah and His Messenger have better knowledge. By Allah, soon afterwards, these two Ayat were revealed,
(And never (O Muhammad ) pray (funeral prayer) for any of them (hypocrites) who dies.) Ever since this revelation came, the Prophet never offered the funeral prayer for any hypocrite nor stood on his grave until Allah, the Exalted and Most Honored, brought death to him.'' At-Tirmidhi collected this Hadith in his Tafsir section of his Sunan and said, "Hasan Sahih''. Al-Bukhari also recorded it.
Maududi - Sayyid Abul Ala Maududi - Tafhim al-Qur'an
This verse was sent down to prevent the Holy Prophet from saying funeral prayers for 'Abdullah bin Ubayy, the ringleader of the hypocrites, who died a short while after the Tabuk Expedition. His son 'Abdullah who was a sincere Muslim called on the Holy Prophet and requested him to give his shirt for his father's shroud. The Holy Prophet very generously granted his request. Then he begged the Holy Prophet to lead his father's funeral prayer. The Holy Prophet agreed to this also but Hadrat 'Umar very respectfully requested him repeatedly not to do so, saying, "O Prophet of Allah! will you say funeral prayer for a person who was guilty of such and such crimes and sins"? The Holy Prophet, who was a blessing both for friends and for foes, got ready to say funeral prayer even for that man who was a deadly enemy of Islam. At last when he stood up to lead the funeral prayer, this verse was sent down to prevent him from this by a direct Command from God, in accordance with the changed policy declared in v. 73 which forbade to do anything that might encourage the hypocrites among the Muslims.
The above incident led to the formulation of the regulation that the leaders and prominent people from among the Muslims should neither lead nor offer the funeral prayers of the sinners against Islam or for those notorious for their disobedience to Islam. After this, whenever a request was made to the Holy Prophet for a funeral prayer, he would first inquire about the conduct of the deceased person. If he came to know that he was a bad person, he would say to his people, "You may perform his burial just as you like".
(And never (O Muhammad) pray for one of them who dieth, nor stand by his grave...) [9:84]. Isma'il ibn 'Abd al-Rahman ibn Ahmad al-Wa'iz informed us through dictation> 'Abd Allah ibn Muhammad ibn Nasr> Yusuf ibn 'Asim al-Razi> al-'Abbas ibn al-Walid al-Narsi> Yahya ibn Sa'id al-Qattan> 'Ubayd Allah ibn 'Umar> Nafi'> Ibn 'Umar who said: “When 'Abd Allah ibn Ubayy died, his son went to the Messenger of Allah, Allah bless him and give him peace, and said: 'Give me your gown to use as a shroud for my father, perform the prayer of the dead on him and seek forgiveness for him'. The Prophet gave him his gown and then said: 'Inform me [when you are ready to bury him] so that I may perform the prayer of the dead on him'. When he was informed and He was about to perform the prayer, 'Umar ibn al-Khattab pulled him and said: 'Did Allah not forbid praying on the hypocrites?' The Prophet said: 'I have been given the choice to seek forgiveness for them or not to seek it', and so he performed the prayer of the dead on him. Then this verse was revealed (And never (O Muhammad) pray for one of them who dieth, nor stand by his grave) upon which he stopped praying on them”. This was narrated by Bukhari from Musaddid and by Muslim from Abu Qudamah 'Ubayd Allah ibn Sa'id, and both Musaddid and 'Ubayd Allah ibn Sa'id related it from Yahya ibn Sa'id. Isma'il ibn Ibrahim al-Nasrabadhi informed us> Abu Bakr ibn Malik al-Qati'i> 'Abd Allah ibn Ahmad ibn Hanbal> Ahmad ibn Hanbal> Ya'qub>> ibn Ibrahim ibn Sa'd> his father> Muhammad ibn Ishaq> al-Zuhri> 'Ubayd Allah ibn 'Abd Allah ibn 'Utbah ibn Mas'ud> Ibn 'Abbas who said: “I heard 'Umar ibn al-Khattab saying: 'When 'Abd Allah ibn Ubayy died, the Messenger of Allah, Allah bless him and give him peace, was called to pray on him. When he stood up in front of the body to perform the prayer, I moved around until I stood close to his chest and said: 'O Messenger of Allah, will you pray on the enemy of Allah 'Abd Allah ibn Ubayy who said such-and-such on such a day and such-and-such on such a day', and he counted all the things he had said, all while the Messenger of Allah, Allah bless him and give him peace, kept smiling. 'When I went on for too long, he said: Move away, O 'Umar, I was offered to choose one of two things and I have made my choice; it was said to me (Ask forgiveness for them (O Muhammad), or ask not forgiveness for them; though thou ask forgiveness for them seventy times Allah will not forgive them…) [9:80]. If I knew that Allah will forgive them if I were to add more than seventy one times, I will do so'. The Prophet, Allah bless him and give him peace, then walked with him and stood there until he prayed on the dead and finished with him. I was amazed that I dared to speak with the Messenger of Allah, Allah bless him and give him peace, in that way. And Allah and His Messenger know better'. 'Umar said: “Then, by Allah, only a short while later, Allah revealed (And never (O Muhammad) pray for one of them who dieth, nor stand by his grave…), after which the Messenger of Allah, Allah bless him and give him peace, never prayed on any hypocrite nor did he stand on the grave of any one of them until Allah, exalted is He, took him away to Him”. The commentators of the Qur'an said: “The Messenger of Allah, Allah bless him and give him peace, was asked about what was done with 'Abd Allah ibn Ubayy and so he said: 'My gown will not avail him of anything with Allah. By Allah I did it because I was hoping that a thousand of his people would embrace Islam' ”.