Summary
Death is the only guarantee of life, and subsequently has a huge importance in Islam as it marks the end of the time that Muslims are given in order to do good deeds and ask for forgiveness of their sins. The moment of death is described in vivid detail in Islamic sources, the Qur'an and the Sunnah (Tradition of the Prophet), wherein it is mentioned that angels have been appointed to each human to take their soul at the moment of death. The souls will be removed from the body either gently or painfully depending on whether you were a righteous believer or not, afterwhich it is sent to the grave where the body is buried ready for the next stage of the afterlife.
“Wheresoever you may be, death will overtake you even if you are in fortresses built up strong and high!” [The Quran: An-Nisaa’ 4:78]
Full Answer
As most people know, death is the only certainty in life, and no matter who you are or where you are, death will eventually come to you. This is mentioned in the Qur’an:
“Wheresoever you may be, death will overtake you even if you are in fortresses built up strong and high!” [The Quran: An-Nisaa’ 4:78]
It is known in Islam that angels are assigned to a person to remove their soul at an appointed time, both the Quran and the Hadith (sayings of the Prophet Muhammad [May the Peace and Blessings of Allah be upon him]) give us some details about what happens at the time of death.
Then why, when the soul at death reaches the throat And you are at that time looking on – And Our angels are nearer to him than you, but you do not see – Then why do you not, if you are not to be recompensed, Bring it back, if you should be truthful? [The Qur’an: Al-Waqi’ah 56:83-87]
The Prophet Muhammad (May the Peace and Blessings of Allah be upon him) said regarding the death of a believing and righteous person:
“..When the believing slave (of Allah) is about to depart this world and enter the Hereafter, there come down to him from heaven, angels with white faces like the sun, and they sit around him as far as the eye can see. They bring with them shrouds from Paradise and perfumes from Paradise. Then the Angel of Death comes and sits by his head, and he says, ‘O good soul, come forth to forgiveness from Allaah and His pleasure. ..’’” [Musnad Ahmad: 18614]
It is then mentioned that the good soul is removed from the body like a drop of water from a jug, it is then clothed and sent up to the heavens as is mentioned next:
So it (the soul) will come out as a drop comes out of the mouth of a jug (with ease), then he will take it, not leaving it in his hand for longer that a blink of an eye until they (he and the other angels) have placed it in that shroud and that embalmment. And there will emanate from it a smell like that of the most sweet smelling musk on the face of the earth. Then they shall ascend with it, and they shall not pass with it by any group of angels but they will say: What is this good and sweet-smelling soul?. Then they shall say to them (he is) “so and so” the son of “so and so” choosing the best of the names he used to be called in this life. Until they reach the lowest sky, then they shall ask permission to enter, and they shall be granted entry, until they end at the seventh heaven sky, then Allah, exalted and high, shall say: “write the book (of deeds) of my servant in `illiyeen (`illiyin: comes from the root word of `uluww which means highness), and his book will be written in `illiyeen, and it shall be said “return him to the earth, for [I promised them] I have created them from it, and into it I shall return them, and from it I shall extract (resurrect) them a second time (20:55)”. So [he is returned to earth and] his soul is returned to his body [he said and he will hear the footsteps of his friends who buried him when they leave him].
But regarding the disbelieving person and the unrighteous the narration goes on as follows:
“When the disbelieving slave is about to depart this world and enter the Hereafter, there come down to him from heaven angels with black faces, bringing sackcloth, and they sit around him as far as the eye can see. Then the Angel of Death comes and sits by his head, and he says, ‘O evil soul, come forth to the wrath of Allaah and His anger.’” [Musnad Ahmad: 18614]
The soul is then removed in the manner that a skewer is ripped out from wet wool and sent up to the first heaven:
So it will be distributed (spread out) throughout his body, then it will be ripped away as a skewer/spit is ripped out of damp cotton [and in its way out it will tear and cut the nerves and blood vessels] [and then he will be cursed by all the angels between the earth and the sky and by all the angels in the sky, and the gates of heaven are closed. There is no gate in the heaven but its people supplicate that the wicked soul shall not be ascended to their side], then he (the angel) will take it (the soul), not leaving it in his hand for longer than a blink of an eye until they have placed it in that sackcloth. And there will emanate from it a stench like that of the most evil smelling corpse on the face of the earth. Then they shall ascend with it, and they shall not pass with it by a group of angels but they will say: What is this wicked soul?. Then they shall say to them (he is) “so and so” the son of “so and so” choosing the most hated of the names he used to be called in this life. Until they reach the lowest heaven (sky), then they shall ask permission to enter, and they shall not be granted entry. Then the Messenger of Allah (May the Peace and Blessings of Allah be upon him) recited “The doors of the sky are not opened to them, nor shall they enter heaven until the camel passes through the eye of the needle” (7:40). Then Allah, exalted and high, shall say: “write the book of my servant in Sijjeen ( Sijjin: comes from the root word of sijn which means narrowness.) (83:7) in the lowest earth”. [Then it will be said “return my slave to the earth, for I promised them I have created them from it, and into it I shall return them, and from it I shall extract (resurrect) them a second time (20:55)”]. Then his soul shall be taken away [from the sky] with a mighty hurl [until it is cast into his body]. Then he (the Prophet [May the Peace and Blessings of Allah be upon him) read: “and those who associate partners with Allah, They are as one who falls from the sky then is snatched by the birds or is cast by the wind into a very low place (22:31)”. [Musnad Ahmad: 18614]
After this the soul, whether righteous or evil will be placed into The Grave where the next stage of the afterlife begins.
In conclusion, the moment of death is something that Islam has given many details about due to it's importance in the life of a Muslim. Death is the moment in which the time given for Muslims to perform good deeds and to avoid sins ends, thus every action in life is in preparation for that moment. It is also a principle in Islam, that the manner in which one dies is an indication of how they lived their life, thus if a person dies while performing a good deed like praying or giving charity, it can be seen as a good sign, and likewise if a person dies whilst doing an evil deed such as abusing someone then this can be seen as an evil sign.
Ultimately, death is something which keeps Muslims grounded, in the sense that they know one day they will be leaving this world, so they shouldn't get too distracted with it, as the Prophet Muhammad (May the Peace and Blessings of Allah be upon him) famously said:
“Remember often the destroyer of pleasures,” by which he meant death. [Sunan ibn Majah 4258]