Surah Yusuf, Ayah 101
Quran 12:101 · Joseph · Makki · Para 13 · Page 247
رَبِّ قَدْ اٰتَیْتَنِیْ مِنَ الْمُلْكِ وَعَلَّمْتَنِیْ مِنْ تَاْوِیْلِ الْاَحَادِیْثِ ۚ فَاطِرَ السَّمٰوٰتِ وَالْاَرْضِ ۫ اَنْتَ وَلِیّٖ فِی الدُّنْیَا وَالْاٰخِرَةِ ۚ تَوَفَّنِیْ مُسْلِمًا وَّاَلْحِقْنِیْ بِالصّٰلِحِیْنَ ۟
Transliteration
Rabbi qad ataytanee mina almulkiwaAAallamtanee min ta/weeli al-ahadeethi fatira assamawatiwal-ardi anta waliyyee fee addunyawal-akhirati tawaffanee musliman waalhiqneebissaliheen
Saheeh International
My Lord, You have given me [something] of sovereignty and taught me of the interpretation of dreams. Creator of the heavens and earth, You are my protector in this world and the Hereafter. Cause me to die a Muslim and join me with the righteous."
Al-Mukhtasar fi Tafsir
Then Joseph called upon his Lord, saying that He had given him power in Egypt and had taught him the interpretation of dreams; and that He is the Creator of the heavens and the earth, originating them when there was nothing like them, the Protector of all his affairs in the life of this world and the Protector of all of them in the Afterlife. Joseph asked Him to take his soul at the end of his life whilst being in a state of submission to God, and to join him with the righteous prophets from his fathers and others in the highest level of Paradise.
Tafsir Ibn Kathir (abridged)
"My Lord! You have indeed bestowed on me of the sovereignty, and taught me something of the interpretation of dreams - the (Only) Creator of the heavens and the earth! You are my Wali in this world and in the Hereafter. Cause me to die as a Muslim, and join me with the righteous. (101)
Yusuf begs Allah to die as A Muslim
This is the invocation of Yusuf, 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 begged Allah to die as a Muslim and be joined with the ranks of the righteous.