The Messenger of Allah ﷺ said, "Prompt your dying ones to say, 'There is no god but Allah.'"
قال رسول الله ﷺ: لقنوا موتاكم لا إله إلا الله.
No references are available.
Muslim narrated it in the Book of Funerals (917) through several routes from Abu Khalid Ahmar, from Yazid bin Kaysan, from Abu Hazim, from Abu Hurairah, and he related the hadith. Ibn Hibban also narrated it in his Sahih (3004) through another route, from Abu Hurairah, who said that the Messenger of Allah ﷺ said, "Prompt your dying with 'there is no god but Allah,' for whoever's last words at death are 'there is no god but Allah' will enter Paradise at some point in time, even if he suffers before that whatever he suffers." Its chain of transmission is sahih. It has also been narrated from him as a stopped report, but the raised version is more sound.Abu Yaala (6147) and Ibn Adi in Al-Kamil (4/1444) both narrated it through routes from Dimam bin Ismail, from Musa bin Wardan, from Abu Hurairah, as a raised hadith, "Say frequently 'I bear witness that there is no god but Allah' before you are cut off from being able to say it, and prompt your dying with it." Its chain of transmission is hasan because of Dimam bin Ismail, concerning whom there is disagreement, though his hadith is hasan when it has a supporting basis, and this hadith has one. Dhahabi said in Al-Mizan, in his entry on him, "Ibn Adi mentioned him in his Al-Kamil and listed hasan hadiths for him."