Abu Hurairah reported,

The Messenger of Allah ﷺ said to his uncle as death approached him, "Say there is no god but Allah, and I will bear witness for you with it on the Day of Resurrection." But he refused, so Allah revealed "Indeed, you do not guide whom you love" [Qasas 28:56], the verse.

Muslim 134

Sahih

حدثنا محمد بن عباد وابن أبي عمر قالا حدثنا مروان عن يزيد وهو ابن كيسان عن أبي حازم

عن أبي هريرة قال

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

مسلم 134صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Faith
Chapter
Proof of the validity of Islam for one facing death as long as the death throes have not begun, which is the gargling sound, and the abrogation of the permissibility of seeking forgiveness for polytheists, and the proof that whoever dies upon shirk is among the companions of Hellfire and nothing can save him from that
Numbering
Darussalam 134
Muslim 134