The Messenger of Allah ﷺ said to his uncle when he was dying, "Say, 'There is no god but Allah,' and I will testify on your behalf with it on the Day of Resurrection." But he refused, so Allah revealed, "Indeed, you do not guide whom you love" [Qasas 28:56].
قال رسول الله ﷺ لعمه عند الموت: قل لا إله إلا الله أشهد لك بها يوم القيامة فأبى، فأنزل الله: {إنك لا تهدي من أحببت} [سورة القصص: ٥٦].
Muslim narrated it in the Book of Faith (25) through several routes from Marwan, from Yazid bin Kaysan, from Abu Hazim, from Abu Hurairah, and he related the hadith.He also narrated it through another route from Yahya bin Saeed, who said, "Yazid bin Kaysan narrated to us," with his chain of transmission, and in it he mentioned the statement of Abu Talib, "Were it not that Quraysh would taunt me, saying that fear alone drove him to say it, I would gladden your eye with it."