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 (916) through several routes from Bishr bin Mufaddal, from Umara bin Ghaziya, who said, Yahya bin Umara related to us, saying, "I heard Abu Saeed Khudri," and he mentioned the hadith.As for his saying, "Prompt your dying ones," what is meant is a person whom death has approached, not one who has already died. The purpose of this prompting is that the last words a person speaks should be, "There is no god but Allah."