اللَّهُمَّ إِنِّي أَسْأَلُكَ حُسْنَ الْخَاتِمَةِ وَأَعُوذُ بِكَ مِنْ سُوءِ الْخَاتِمَةِ، اللَّهُمَّ اجْعَلْ خَيْرَ أَعْمَالِنَا خَوَاتِمَهَا وَخَيْرَ أَيَّامِنَا يَوْمَ نَلْقَاكَ
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, he is Your servant, son of Your male servant, son of Your female servant. He used to testify that there is no deity except You and that Muhammad is Your servant and messenger, and You know him best.
Hasanاللَّهُمَّ اغْفِرْ لَهُ وَارْحَمْهُ وَأَدْخِلْهُ الْجَنَّةَ وَأَعِذْهُ مِنْ عَذَابِ الْقَبْرِ
O Allah, forgive him, have mercy on him, admit him to Paradise, and protect him from the punishment of the grave.
Sahihاللَّهُمَّ لَا تَحْرِمْنَا أَجْرَهُ وَلَا تُضِلَّنَا بَعْدَهُ
O Allah, do not deprive us of his reward, and do not lead us astray after him.
Sahihاللَّهُمَّ أَجِرْنِي مِنَ النَّارِ، اللَّهُمَّ أَجِرْنِي مِنَ النَّارِ، اللَّهُمَّ أَجِرْنِي مِنَ النَّارِ، اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ النَّارِ
O Allah, save me from the Fire. O Allah, save me from the Fire. O Allah, save me from the Fire. O Allah, I seek refuge in You from the Fire.
Sahih