Which angels take the soul of the Muslim, the angels of mercy or the angels of wrath?
Question

                If a Muslim who sins dies, is his soul taken by the angels of mercy or the angels of wrath? Please note that he prays, but he commits some sins such as looking at haraam things or listening to music. 

May Allah reward you with good.
Praise be to Allah.
    Firstly: 

    The majority of 
    texts that speak of this matter divide people into two categories: 

    1.
    Believers. The angels of mercy take their souls and lift them 
    up to heaven with great care, coming with glad tidings, calling them by the 
    most loved of their names, so they feel joy, blessing and happiness which 
    makes them steadfast.

    2.
    Disbelievers and hypocrites. The angels of wrath take their 
    souls, coming with harshness and warnings, and the gates of heaven are 
    closed in their faces, so they are thrown in the earth to face woe and 
    punishments as recompense for what they did in this world of wrongdoing, 
    disbelief and enmity.

    Allah, may He be 
    glorified and exalted, mentioned that in the Holy Qur'aan, where He says 
    (interpretation of the meaning):

    “By those 
    (angels) who pull out (the souls of the disbelievers and the wicked) with 
    great violence.

    2. By those 
    (angels) who gently take out (the souls of the believers).

    3. And by those 
    that swim along (i.e. angels or planets in their orbits)”

    [al-Naazi’aat 
    79:1-3]. 

    Al-Haafiz ibn 
    Katheer (may Allah have mercy on him) said: 

    Ibn Mas’ood, Ibn 
    ‘Abbaas, Masrooq, Sa’eed ibn Jubayr, Abu Saalih, Abu’l-Duha and al-Suddi 
    said: “By those who pull out” refers to the angels, i.e., when they 
    pull out the souls of the sons of Adam. There are some whose soul is taken 
    forcefully and they suffer when it is taken out, and there are some whose 
    soul is taken gently, which is referred to in the verse, “and those who 
    gently take out.” This was stated by Ibn ‘Abbaas. 

    It was also 
    narrated from Ibn ‘Abbaas that al-naazi’aat refers to the souls of 
    the disbelievers, which are taken out, then plunged into the Fire. This was 
    narrated by Ibn Abi Haatim. End quote. 

    Tafseer al-Qur’aan 
    al-Kareem, 
    8/312 

    Secondly: 

    There is fear for 
    the Muslim who commits sin or is an evildoer -- and what is meant is the one 
    who persists in committing major sins or transgresses against people and 
    dies in that state. To which of the two groups mentioned above does he 
    belong? Is his soul taken by the angels of mercy and treated in the same 
    manner as the believers, or is it taken by the angels of wrath and treated 
    in the same manner as the disbelievers? 

    This is a matter 
    of the unseen and we have not found any text that clearly and definitively 
    states the situation of the one who commits major sins. 

    But there are some 
    references that may indicate that the angels of wrath take the souls of 
    those who commit major sins. For example: 

    1.

    The hadeeth about 
    the man who killed one hundred people, then he repented to Allah, may He be 
    glorified and exalted. When he died, the angels of mercy and the angels of 
    wrath disputed as to which of them would take his soul and take it up to 
    heaven. The story was narrated by Abu Sa’eed al-Khudri from the Prophet 
    (blessings and peace of Allah be upon him):

    The angels of 
    mercy and the angels of torment disputed over him. The angels of mercy said: 
    he came repenting and turning wholeheartedly towards Allaah. The angels of 
    torment said: He never did anything good. Then an angel in the form of a man 
    came to them and they appointed him (to decide) between them. He said: 
    Measure the distance between the two lands, and whichever is closer, that is 
    where he belongs. So they measured it and they found that he was closer to 
    the land that he was heading for, so the angels of mercy took him.”

    Narrated by al-Bukhaari 
    (3740) and Muslim (2766). 

    Think about how 
    the angels of wrath wanted to take the soul of this sinner who had killed 
    one hundred people. Were it not for the sincerity of his repentance, his 
    soul would have fallen to the share of the angels of wrath. So there is the 
    fear for all of those who commit major sins that the angels of wrath may 
    take their souls if they do not repent to Allah, may He be glorified and 
    exalted. 

    2.

    There are many 
    hadeeths which describe how the angels come to take the soul of the one who 
    is dying and take it up to the highest heavens; these hadeeths compare and 
    contrast the situation of the believers and that of the disbelievers. In 
    some of these hadeeths it says al-faajir (evildoer) instead of al-kaafir 
    (disbeliever). And in some of them it describes him as al-rajul al-su’ (the 
    bad man). This may also indicate that the one who commits major sins is in 
    great danger in this regard. 

    It was narrated 
    from al-Bara’ ibn ‘Aazib (may Allah be pleased with him) that the Prophet 
    (blessings and peace of Allah be upon him) said -- in a lengthy hadeeth in 
    which he described the situation of the believer and the evildoer when their 
    souls are taken --:

    “… as for the 
    evildoer, when he is about to enter the Hereafter and depart from this 
    world, the Angel of Death comes to him and sits by his head. There come down 
    to him angels from heaven with black faces, bringing with them sackcloth. 
    They sit with him as far as the eye can see. Then the Angel of Death and 
    says, ‘O evil soul, come out to the wrath and anger of Allaah…’ . 

    This was narrated 
    by al-Haakim in al-Mustadrak (1/93) and classed as saheeh by Shaykh 
    al-Albaani in Ahkaam al-Janaa’iz (no. 108). The hadeeth is also narrated in 
    al-Sunan. Ibn Tooloon compiled in his book al-Tahreer al-Mursakh fi 
    Ahwaal al-Barzakh (p. 75-112) the hadeeths and reports which speak of 
    this matter. 

    But if we say that 
    what is meant by the evildoer or the bad man in these reports is the 
    disbeliever who is mentioned in the other reports, then all the versions of 
    the hadeeth are in accordance, as seems to be the case. So that means that 
    there is nothing definite about Muslims who commit wrong actions and major 
    sins. And Allah knows best. 

    Shaykh al-Shanqeeti 
    (may Allah have mercy on him) said: 

    “Those whose 
    lives the angels take while they are in a pious state (i.e. pure from all 
    evil, and worshipping none but Allaah Alone) saying (to them): Salaamun 
    ‘Alaikum (peace be on you) enter you Paradise, because of that (the good) 
    which you used to do (in the world)”

    [al-Nahl 16:32 
    –interpretation of the meaning]. 

    In this verse 
    Allah, may He be glorified and exalted, stated that the pious who obeyed the 
    commands of their Lord and avoided that which He forbade will have their 
    souls taken by the angels when they are in a good state, i.e., pure and free 
    of shirk and sin -- according to the soundest commentaries -- and they will 
    give them the glad tidings of Paradise and greet them with salaam.. 

    This meaning is 
    also stated elsewhere, as in the verses in which Allah says (interpretation 
    of the meaning): 

    “Verily, those 
    who say: “Our Lord is Allaah (Alone),” and then they stand firm, on them the 
    angels will descend (at the time of their death) (saying): “Fear not, nor 
    grieve! But receive the glad tidings of Paradise which you have been 
    promised!”

    [Fussilat 
    41:30] 

    “and its 
    keepers will say: Salaamun ‘Alaykum (peace be upon you)! You have done well, 
    so enter here to abide therein”

    [al-Zumar 
    39:74] 

    “And angels 
    shall enter unto them from every gate (saying):

    24. “Salâmun 
    ‘Alaikum (peace be upon you) for you persevered in patience! Excellent 
    indeed is the final home!”

    [al-Ra’d 
    13:23-24]

    The glad tidings 
    are given at the time of death, and when they entered Paradise from one 
    gate, because they are glad tidings of good after moving to the Hereafter. 

    From the 
    description of those whose souls are taken when they are in a good state and 
    to whom it is said ‘ peace be upon you, enter Paradise,’ it may be 
    understood that those who are not described as pious will not be taken by 
    the angels in that noble state or be greeted or given glad tidings. 

    Allah has stated 
    this meaning elsewhere, such as in the verses where He says (interpretation 
    of the meaning):

    “Those whose 
    lives the angels take while they are doing wrong to themselves (by disbelief 
    and by associating partners in worship with Allaah and by committing all 
    kinds of crimes and evil deeds).” Then, they will make (false) submission”

    [al-Nahl 
    16:28] 

    “Verily, as for 
    those whom the angels take (in death) while they are wronging themselves (as 
    they stayed among the disbelievers even though emigration was obligatory for 
    them), they (angels) say (to them): ‘In what (condition) were you?’ They 
    reply: ‘We were weak and oppressed on the earth.’ They (angels) say: ‘Was 
    not the earth of Allaah spacious enough for you to emigrate therein?’ Such 
    men will find their abode in Hell — what an evil destination!”

    [al-Nisa’ 
    4:97] 

    “And if you 
    could see when the angels take away the souls of those who disbelieve (at 
    death); they smite their faces and their backs, (saying): “Taste the 
    punishment of the blazing Fire”

    [al-Anfaal 
    8:50]. 

    And there are 
    other similar verses. End quote from 
    Adwa’ al-Bayaan, 
    3/3 

    Perhaps it may be 
    said here -- and Allah knows best -- that the situation of those who commit 
    acts of disobedience and major sins, at the time of death, varies according 
    to their level of disobedience and obedience. For the person who is one of 
    those who affirm Tawheed and are good and righteous, they will have the glad 
    tidings and good situation that Allah has promised here, and that the one 
    who mixed good deeds with bad deeds will find himself in a mixed situation, 
    so he will be deprived of the glad tidings and good situation and merciful 
    treatment by the angels, according to his situation and deeds. 

    See also the 
    answer to question number 52887. 

    And Allah knows best.