In The Name of Allaah, The Most Merciful, The Besstower of Mercy
Allaah [The Most High] said that Yoosuf [alayhis-salaam] said:
أَنتَ وَلِيِّي فِي الدُّنْيَا وَالْآخِرَةِ ۖ تَوَفَّنِي مُسْلِمًا وَأَلْحِقْنِي بِالصَّالِحِينَ
You [Allaah] are my Wali [Protector, Helper, Supporter, Guardian, etc.] in this world and in the Hereafter, cause me to die as a Muslim [the one submitting to Your Will], and join me with the righteous. [12:101]
Imaam Ibnul Qayyim [rahimahullaah] said: This supplication gathers within it a firm acknowledgement of Allaah’s Oneness [in His Lordship, Worship and Names and Attributes], submission to the Lord [Allaah], a manifestation of one’s need of Him and a declaration of one’s innocence from having a protector besides Allaah [Free Is He From All Imperfections]; and that being enabled to die upon Islaam is the loftiest goal of the slave-an affair that in the hands of Allaah alone and none else; an acknowledgement of the afterlife and seeking the company of those whom Allaah has bestowed His Grace.
[Al-Fawaa’id’ page 286. Slightly paraphrased]