“ O Allah! I ask You for a pure life and a good death and I ask You for such a return (from this world) that (on the Judgement day) I am neither disgraced, nor humiliated”
Allahumma inni as’aluka eeshatan-naqiyyata, wa meetatan sawiyyata, wa maraddan ghaira makhziyyin-walaa faadhih
”My Lord, Creator of the heavens and the earth!You are my Protector in this world and in the Hereafter. Cause me to die as a Muslim and join me with the righteous.”
This is the invocation of Yusuf Alaihissalaam, the truthful one, to his Lord the Exalted and Most Honored. He invoked Allah after His favor was complete on him by being reunited with his parents and brothers, after He had bestowed on him prophethood and kingship. He begged his Lord, the Exalted and Ever High, that as He has perfected His bounty on him in this life, to continue it until the Hereafter. He begged Him that, when he dies, he dies as a Muslim, as Ad-Dahhak said, and to join him with the ranks of the righteous, with his brethren the Prophets and Messengers, may Allah’s peace and blessings be on them all. It is possible that Yusuf, peace be upon him, said this supplication while dying.
In the Two Sahihs it is recorded that `A’ishah, may Allah be pleased with her, said that while dying, the Messenger of Allah was raising his finger and said – thrice,
(O Allah to Ar-Rafiq Al-A`la ﴿the uppermost, highest company in heaven﴾.)
It is also possible that long before he died, Yusuf Alaihissalaam begged Allah to die as a Muslim and be joined with the ranks of the righteous.
”O Allah, I seek refuge in You from the PUNISHMENT of the GRAVE, and I seek refuge in You from the trial of the False Messiah, and I seek refuge in You from the trials of life and death. O Allah, I seek refuge in You from SIN and from DEBT.”
Allaahumma ‘innee ‘a’oothu bika min ‘athaabil-qabri, wa ‘a’oothu bika min fitnatil-maseehid-dajjaali, wa ‘a’oothu bika min fitnatil-mahyaa walmamaati. Allaahumma ‘innee ‘a’oothu bika minal-ma’thami walmaghrami.