The Messenger of Allah ﷺ said to his uncle as he was dying, "Say, 'There is no god but Allah,' and I will bear witness for you with it on the Day of Resurrection."His uncle replied, "Were it not that Quraysh would taunt me, saying that I only said it out of fear of death, I would have given you the comfort of seeing me declare it."So Allah the Exalted revealed, "Indeed, you do not guide whom you love, but Allah guides whom He wills, and He is most knowing of those who are guided" [Qasas 28:56].
قال رسول الله ﷺ لعمه عند الموت: قل لا إله إلا الله، أشهد لك بها يوم القيامة، قال: لولا أن تعيرني قريش يقولون: إنما حمله على ذلك الجزع لأقررت بها عينيك، فأنزل الله تعالى: {إنك لا تهدى من أحببت ولكن الله يهدي من يشاء وهو أعلم بالمهتدين} [القصص: ٥٦].
Muslim narrated it in the Book of Faith (25:42) from Muhammad bin Hatim bin Maymun, who said, Yahya bin Saeed narrated to us, who said, Yazid bin Kaysan narrated to us, from Abu Hazim Ashjai, from Abu Hurairah, and he mentioned it.