Hadith 917
Mu`adh bin Jabal (May Allah be pleased with him) reported:
عن معاذ رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم : "من كان آخر كلامه لا إله إلا الله دخل الجنة" ((رواه أبو داود والحاكم وقال: صحيح الإسناد)).
The Messenger of Allah (ﷺ) said, "He whose last words are: `La ilaha illallah' (There is no true god except Allah) will enter Jannah.'' [Abu Dawud].
In plain words
Whoever's final words in this life are the declaration that there is no true god except Allah is promised Paradise, which is why these words are so precious at the end.
Reference : Riyad as-Salihin 917 In-book reference : Book 6, Hadith 24