Saeed bin Musayab reported,

He reported that when Abu Talib was on the point of death, the Messenger of Allah ﷺ came to him and found Abu Jahl bin Hisham and Abdullah bin Abu Umaya bin Mughira with him.The Messenger of Allah ﷺ said to Abu Talib, "Uncle, say there is no god but Allah, a word by which I may plead for you before Allah."Abu Jahl and Abdullah bin Abu Umaya said, "Abu Talib, would you turn away from the religion of Abdul-Muttalib?"The Messenger of Allah ﷺ kept putting the words to him, and the two of them kept repeating that same statement, until the last thing Abu Talib said to them was that he was upon the religion of Abdul-Muttalib, and he refused to say there is no god but Allah.The Messenger of Allah ﷺ then said, "By Allah, I will surely ask forgiveness for you unless I am forbidden to do so."So Allah revealed concerning him, "It is not for the Prophet" [Tawbah 9:113], to the end of the verse.

Bukhari 1360

Sahih

حدثنا إسحاق أخبرنا يعقوب بن إبراهيم قال حدثني أبي عن صالح عن ابن شهاب قال أخبرني

سعيد بن المسيب عن أبيه

أنه أخبره أنه لما حضرت أبا طالب الوفاة جاءه رسول الله ﷺ فوجد عنده أبا جهل بن هشام وعبد الله بن أبي أمية بن المغيرة قال رسول الله ﷺ لأبي طالب يا عم قل لا إله إلا الله كلمة أشهد لك بها عند الله فقال أبو جهل وعبد الله بن أبي أمية يا أبا طالب أترغب عن ملة عبد المطلب فلم يزل رسول الله ﷺ يعرضها عليه ويعودان بتلك المقالة حتى قال أبو طالب آخر ما كلمهم هو على ملة عبد المطلب وأبى أن يقول لا إله إلا الله فقال رسول الله ﷺ أما والله لأستغفرن لك ما لم أنه عنك فأنزل الله تعالى فيه {ما كان للنبي} الآية

البخاري 1360صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Funerals
Chapter
If a polytheist says "There is no god but Allah" at the time of death
Numbering
Darussalam 1360
Bukhari 1360