When Abu Talib was on his deathbed, the Prophet ﷺ entered to see him while Abu Jahl was already there. The Prophet ﷺ said, "Uncle, say 'There is no god but Allah,' a statement by which I may plead on your behalf before Allah."Abu Jahl and Abdullah bin Abu Umaya said, "Abu Talib, will you turn away from the religion of Abdul-Muttalib?"They kept speaking to him until the last thing he said to them was that he was upon the religion of Abdul-Muttalib.The Prophet ﷺ said, "I will surely seek forgiveness for you as long as I am not forbidden from doing so."Then the verse was revealed, "It is not for the Prophet and those who have believed to ask forgiveness for the polytheists, even if they were relatives, after it has become clear to them that they are companions of Hellfire" [Tawbah 9:113], and the verse was revealed, "Indeed, you do not guide whom you love" [Qasas 28:56].
حدثنا محمود حدثنا عبد الرزاق أخبرنا معمر عن الزهري
أن أبا طالب لما حضرته الوفاة دخل عليه النبي ﷺ وعنده أبو جهل فقال أي عم قل لا إله إلا الله كلمة أحاج لك بها عند الله فقال أبو جهل وعبد الله بن أبي أمية يا أبا طالب ترغب عن ملة عبد المطلب فلم يزالا يكلمانه حتى قال آخر شيء كلمهم به على ملة عبد المطلب فقال النبي ﷺ لأستغفرن لك ما لم أنه عنه فنزلت {ما كان للنبي والذين آمنوا أن يستغفروا للمشركين ولو كانوا أولي قربى من بعد ما تبين لهم أنهم أصحاب الجحيم} ونزلت {إنك لا تهدي من أحببت}