Sahih al-Bukhari, Book 65, Hadith 4675 (In-Book) ⓘ
Narrated Al-Musaiyab: When Abu Talib's death approached, the Prophet went to him while Abu Jahl and `Abdullah bin Abi Umaiya were present with him. The Prophet said, "O uncle, say: None has the right to be worshipped except Allah, so that I may argue for your case with it before Allah." On that, Abu Jahl and `Abdullah bin Abu Umaiya said, "O Abu Talib! Do you want to renounce `Abdul Muttalib's religion?" Then the Prophet said, "I will keep on asking (Allah for) forgiveness for you unless I am forbidden to do so." Then there was revealed:-- 'It is not fitting for the Prophet and those who believe that they should invoke (Allah) for forgiveness for pagans even though they be of kin, after it has become clear to them that they are companions of the Fire.' (9.113)
حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، عَنْ أَبِيهِ، قَالَ لَمَّا حَضَرَتْ أَبَا طَالِبٍ الْوَفَاةُ دَخَلَ عَلَيْهِ النَّبِيُّ صلى الله عليه وسلم وَعِنْدَهُ أَبُو جَهْلٍ وَعَبْدُ اللَّهِ بْنُ أَبِي أُمَيَّةَ، فَقَالَ النَّبِيُّ صلى الله عليه وسلم " أَىْ عَمِّ قُلْ لاَ إِلَهَ إِلاَّ اللَّهُ. أُحَاجُّ لَكَ بِهَا عِنْدَ اللَّهِ ". فَقَالَ أَبُو جَهْلٍ وَعَبْدُ اللَّهِ بْنُ أَبِي أُمَيَّةَ يَا أَبَا طَالِبٍ، أَتَرْغَبُ عَنْ مِلَّةِ عَبْدِ الْمُطَّلِبِ. فَقَالَ النَّبِيُّ صلى الله عليه وسلم " لأَسْتَغْفِرَنَّ لَكَ مَا لَمْ أُنْهَ عَنْكَ ". فَنَزَلَتْ {مَا كَانَ لِلنَّبِيِّ وَالَّذِينَ آمَنُوا أَنْ يَسْتَغْفِرُوا لِلْمُشْرِكِينَ وَلَوْ كَانُوا أُولِي قُرْبَى مِنْ بَعْدِ مَا تَبَيَّنَ لَهُمْ أَنَّهُمْ أَصْحَابُ الْجَحِيمِ}
also referenced under: Hadith 4675 (DarusSalam) & Volume 6, Book 60, Hadith 197 (USC-MSA)