The surest du'a for a good ending is the one in the Qur'an: "Cause me to die a Muslim and join me with the righteous" (Yusuf 12:101), alongside the Prophet's ﷺ frequent du'a, "Ya muqallib al-qulub, thabbit qalbi 'ala dinik": O Turner of hearts, make my heart firm on Your religion. The Companions added their own words, and paired them with a life that pointed the same way.
We drew this from our chapter notes on Prayers of the Pious, a book of thirty du'as whose strongest cluster is about how the early Muslims asked to end well.
Why endings matter so much
After a man who fought fiercely for the Muslims took his own life when wounded, the Prophet ﷺ said a person may seem to do the deeds of the people of Paradise yet be of the people of the Fire, and the reverse, and that "deeds are judged by their endings" (Sahih al-Bukhari 6493 and 6607).
It is a reason to keep going, not to despair, and never to look down on someone still on the way.
Du'as for a good ending from the Qur'an and Sunnah
Start with these, which come from revelation:
- To die in submission. Yusuf, at the height of his worldly success, asked: "Cause me to die a Muslim and join me with the righteous" (12:101). See it among our Qur'anic du'as and in the Surah Yusuf mind map.
- That the heart not swerve. "Our Lord, do not let our hearts deviate after You have guided us, and grant us mercy from Yourself" (Ali 'Imran 3:8).
- To die with the righteous. "Our Lord, forgive us our sins, remove from us our misdeeds and cause us to die with the righteous" (Ali 'Imran 3:193).
- For a firm heart. Anas reported that the Prophet ﷺ often said "Ya muqallib al-qulub, thabbit qalbi 'ala dinik." Asked if he feared for them, he said hearts are between two of the fingers of Allah, who turns them as He wills (Jami' at-Tirmidhi 2140, graded sahih by al-Albani; Zubayr 'Ali Za'i graded this chain weak and the hadith sahih through supporting reports, except the question "do you fear for us?", which he found no sound support for). A close wording is in Sahih Muslim 2654: "O Turner of hearts, turn our hearts to Your obedience."
- For the highest garden. "When you ask Allah, ask Him for al-Firdaws," the highest part of Paradise (Sahih al-Bukhari 2790).
The du'as the Companions made
These are the Companions' own words, not the Prophet's ﷺ: beautiful to borrow, but not Sunnah in the same sense.
Abu Bakr: "make the best of my days the day I meet You." The book opens with Abu Bakr asking that his life's end be its best part, and his best day the day he meets Allah (ch. 1). We could not trace a chain to Abu Bakr. The same words appear in the Bedouin report below, and as the Prophet's ﷺ du'a in a report al-Haythami judged weak (Majma' az-Zawa'id 16974). The meaning is sound; do not quote it as a proven hadith.
'Umar: martyrdom in Madinah. 'Umar prayed, "O Allah, grant me martyrdom in Your cause, and let my death be in the city of Your Messenger" (Sahih al-Bukhari 1890). Both seemed unlikely, and both were answered: he was stabbed while leading Fajr (ch. 5). The Prophet ﷺ said whoever sincerely asks Allah for martyrdom is raised to the rank of the martyrs even if he dies in his bed (Sahih Muslim 1909).
Ibn Mas'ud: faith that never turns back. The Prophet ﷺ heard Ibn Mas'ud praying and said, "Ask, and you will be given." He was asking for faith that never turns back, delight that never runs out, and the Prophet's ﷺ company in the highest garden of eternity (Musnad Ahmad 4255, sahih through supporting reports per the Darussalam edition; al-Mustadrak 1949, chain sahih per al-Hakim, though its modern editors note a break in that chain). See ch. 6. Rabi'ah ibn Ka'b asked for the same company and was told to help with it through many prostrations (Sahih Muslim 489).
'Umar weeping in tawaf. Abu 'Uthman an-Nahdi heard 'Umar say while circling the Ka'bah: if You have written me among the blessed, keep me there, and if You have written sin and wretchedness on me, erase it and write me among the blessed, for You erase and confirm what You will (at-Tabari, Jami' al-Bayan, on 13:39). Promised Paradise, he never took it for granted (ch. 28).
The book also tells of Hudhayfah ibn al-Yaman dying with "You know that I love You" (ch. 7) and Abdullah ibn Sa'd ibn Abi Sarh dying just after Fajr, as he had asked (ch. 21). We have not traced those two reports, so read them as the book's account.
Read with care
- The Bedouin. At-Tabarani (al-Mu'jam al-Awsat 9444) reports a Bedouin whose praise of Allah earned a gift from the Prophet ﷺ, ending with a request for a good ending (ch. 17). Al-Haythami said its narrators are those of the Sahih apart from one who is reliable (Majma' az-Zawa'id 17267). A sound chain is not the end of the matter, so treat it as a lesser report than the Qur'anic and sahih du'as above.
- The "erase me" du'a. Ibn Mas'ud's version has a broken chain, as Abu Qilabah never met him (Majma' az-Zawa'id 17436). 'Umar's comes through Abu 'Uthman an-Nahdi.
- "Allahumma ahsin 'aqibatana fil-umuri kulliha." Musnad Ahmad 17628 has it, but the Darussalam editors do not count one narrator, Ayyub ibn Maysarah, among the reliable, and note that Busr ibn Artah's Companionship is disputed. Say it as your own du'a, not as established Sunnah.
What they did alongside the du'a
The Companions did not ask and then wait. 'Umar asked sincerely for martyrdom. Ibn Mas'ud was heard while praying. Rabi'ah was told to earn his request with sujud. And 'Umar, promised Paradise, wept in tawaf anyway. Behind it all was longing for the Prophet ﷺ, as our notes on Meeting Muhammad, ch. 29 and 30 and the story of his passing show.
Habits you can start today
- A daily du'a for steadfastness. Say "Ya muqallib al-qulub, thabbit qalbi 'ala dinik" after each prayer, and ask for what 12:101 asks for in sujud.
- Guard Fajr, and add a little night prayer: see how to pray tahajjud.
- Write your will. Start with your will and burial, and learn how to pray janazah for others.
- End each day with istighfar. Close the day with istighfar and your evening adhkar, using Morning and Evening Adhkar.
As for signs of a good ending, scholars mention some, such as dying with the shahadah on one's lips, but they are for hope, not for judging anyone. Leave every ending to Allah, and work on your own.