Musayab bin Hazn reported,

When Abu Talib was on the verge 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 except 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 argument, until the last thing Abu Talib said to them was, "He is upon the religion of Abdul-Muttalib." He refused to say there is no god except Allah.The Messenger of Allah ﷺ then said, "By Allah, I will keep asking forgiveness for you unless I am forbidden to do so."So Allah, the Exalted, revealed, "It is not for the Prophet and those who believe to ask forgiveness for the idolaters, even if they are close relatives, after it has become clear to them that they are the companions of the Blaze" [Tawba 9:113]. And concerning Abu Talib, Allah revealed to the Messenger of Allah ﷺ, "You cannot guide whomever you love, but Allah guides whomever He wills, and He knows best those who are guided" [Qasas 28:56].

Azami 8602

Sahih

عن المسيب بن حزن قال

لما حضر أبا طالب الوفاة جاءه رسول الله ﷺ فوجد عنده أبا جهل بن هشام وعبد الله بن أبي أمية بن المغيرة. قال رسول الله ﷺ لأبي طالب: يا عم، قل لا إله إلا الله، كلمة أشهد لك بها عند الله. فقال أبو جهل وعبد الله بن أبي أمية: يا أبا طالب أترغب عن ملة عبد المطلب؟ فلم يزل رسول الله ﷺ يعرضها عليه. ويعودان بتلك المقالة، حتى قال أبو طالب آخر ما كلمهم: هو على ملة عبد المطلب. وأبى أن يقول: لا إله إلا الله. فقال رسول الله ﷺ: أما والله لأستغفرن لك ما لم أنه عنك. فأنزل الله تعالى {ما كان للنبي والذين ءامنوا أن يستغفروا للمشركين ولو كانوا أولي قربى من بعد ما تبين لهم أنهم أصحب الجحيم} [التوبة: ١١٣] وأنزل في أبي طالب: فقال الرسول الله ﷺ: {إنك لا تهدي من أحببت ولكن الله يهدي من يشاء وهو أعلم بالمهتدين} [ القصص: ٥٦].

الأعظمي 8602صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Mission of the Prophet ﷺ and his life in Makkah
Section
Entering of the Prophet ﷺ with the Muslims into the valley of Abu Talib in the seventh year of the mission
Numbering
Jami al-Kamil 8602 (2nd edition)
Azami 8602