Sahih Muslim 25 a
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا مُحَمَّدُ بْنُ عَبَّادٍ، وَابْنُ أَبِي عُمَرَ، قَالاَ حَدَّثَنَا مَرْوَانُ، عَنْ يَزِيدَ، - وَهُوَ ابْنُ كَيْسَانَ - عَنْ أَبِي حَازِمٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم لِعَمِّهِ عِنْدَ الْمَوْتِ قُلْ لاَ إِلَهَ إِلاَّ اللَّهُ أَشْهَدُ لَكَ بِهَا يَوْمَ الْقِيَامَةِ " . فَأَبَى فَأَنْزَلَ اللَّهُ { إِنَّكَ لاَ تَهْدِي مَنْ أَحْبَبْتَ} الآيَةَ ."
It is narrated on the authority of Abu Huraira that the Messenger of Allah said to his uncle at the time of his death:
Make a profession of it that there is no god but Allah and I will bear testimony (of your being a Muslim) on the Day of judgment. But he (Abu Talib) refused to do so. Then Allah revealed this verse: " Verily you cannot guide to the right path whom you love. And it is Allah Who guides whom He will and He knows best who are the guided" (28:56).
Full reference and source
Sahih Muslim 25 a In-book : Book 1, Hadith 41 USC-MSA web (English) : Book 1, Hadith 37 (deprecated)
View source on Sunnah.com (opens in a new tab)