اللَّهُمَّ إِنِّي أَسْأَلُكَ حُسْنَ الْخَاتِمَةِ وَأَعُوذُ بِكَ مِنْ سُوءِ الْخَاتِمَةِ، اللَّهُمَّ اجْعَلْ خَيْرَ أَعْمَالِنَا خَوَاتِمَهَا وَخَيْرَ أَيَّامِنَا يَوْمَ نَلْقَاكَ
Allahumma inni as'aluka husnal-khatimah wa a'udhu bika min su'il-khatimah. Allahummaj'al khayra a'malina khawatimaha wa khayra ayyamina yawma nalqak
O Allah, I ask You for a good ending and I seek refuge in You from a bad ending. O Allah, make the best of our deeds their conclusions and the best of our days the day we meet You.
Husn al-khatimah (a good ending) means dying while in a state of faith and good deeds — in prayer, while fasting, on a Friday, making dhikr, or during any righteous act. Its opposite, su' al-khatimah (bad ending), was what the Prophet ﷺ feared most for his ummah. He said: "Actions are judged by their endings" (Sahih al-Bukhari 6493). A person could worship for sixty years but falter at the end. This expanded du'a asks for both sides: a good ending and protection from a bad one. It then adds the beautiful request that your final deeds be your finest and your last day be your greatest.
Related Du'as
اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ فِتْنَةِ الْقَبْرِ وَمِنْ عَذَابِ الْقَبْرِ
O Allah, I seek refuge in You from the trial of the grave and from the punishment of the grave.
Sahihاللَّهُمَّ اجْعَلْ قَبْرِي رَوْضَةً مِنْ رِيَاضِ الْجَنَّةِ وَلَا تَجْعَلْهُ حُفْرَةً مِنْ حُفَرِ النَّارِ
O Allah, make my grave a garden from the gardens of Paradise, and do not make it a pit from the pits of the Fire.
Hasanاللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ عَذَابِ الْقَبْرِ وَمِنْ عَذَابِ جَهَنَّمَ وَمِنْ فِتْنَةِ الْمَحْيَا وَالْمَمَاتِ وَمِنْ شَرِّ فِتْنَةِ الْمَسِيحِ الدَّجَّالِ
O Allah, I seek refuge in You from the punishment of the grave, from the torment of the Fire, from the trials of life and death, and from the evil of the trial of the False Messiah.
Sahihاللَّهُمَّ ثَبِّتْنِي عِنْدَ السُّؤَالِ، اللَّهُمَّ ثَبِّتْنِي بِالْقَوْلِ الثَّابِتِ فِي الْحَيَاةِ الدُّنْيَا وَفِي الْآخِرَةِ
O Allah, keep me firm at the time of questioning. O Allah, make me firm with the firm word in the life of this world and in the Hereafter.
Sahih