Capital Punishment and Prophet Muhammad
A Muslim may be sentenced to death under Shariah, Islamic law, for the murder of a Muslim, adultery, apostasy (deserting Islam), a third conviction for drinking alcohol and a fifth conviction for theft. A dhimmi (zimmi, non-Muslim living in an Islamic state) can be executed for sex with a Muslim woman, and "persecution" of Islam, for example blasphemy against Allah or Prophet Muhammad, or attempting to proselytise i.e. convert a Muslim from his religion.
Shariah is not in force in many Muslim countries with a Muslim majority, especially those which still have laws on their statute books which date from their colonial past. One of the aims of Islamic fundamentalists is to re-introduce Shariat and that is one reason why HRAIC opposes fundamentalism.
Muslim countries which carry out the death penalty, in order of severity, Saudi Arabia (Shariah), Iraq (secular; mainly political prisoners), Iran (Shariah), Egypt (secular), Taleban Afghanistan (Shariah).
If a married Muslim has sex with someone other than his/her partner, then Rajam, stoning to death is the penalty. Rajam is not Quranic but was practised by Prophet Muhammad and so is Shariah. The man is to be buried up to his waist and the woman to above her breasts. The stones must not be too small or death may not ensue. Nor must the stones be too big or death may come too quickly. A pregnant woman should not be executed until after the birth of the child.
Muslim 682 The Prophet said: "Do not stone the adulteress who is pregnant until she has had her child." After the birth she was put into a ditch up to her chest and the Prophet commanded them to stone her. Khalid came forward with a stone which he threw at her head, and there spurted blood on the face of Khalid and he cursed her. The gentle Prophet prayed over her and she was buried.
For more "Stoning and Prophet Muhammad"
Apostasy - deserting Islam
The Death Penalty for apostasy is also non-Quranic but was practised by Prophet Muhammad and so is Islamic law. For example:
Muslim 623 The Prophet said: "It is not permissible to take the life of a Muslim except in one of the three cases: the married adulterer, a life for a life (if the person is Muslim), and the deserter of Islam."
For more "Apostasy and Prophet Muhammad"
Death Penalty for Drinking, the third offence
For example from "The Hadith of Prophet Muhammad"
Abu Dawud (38:4467) The Prophet said, "If they drink wine, flog them Again if they drink it, flog them. Again if they drink it kill them." But in (38:4469) they received three cautionary floggings before being killed on the fourth occasion
For more "Alcohol and Prophet Muhammad"
Death Penalty for Theft - the fifth offence
From "The Hadith of Prophet Muhammad":
Abu Dawud (38:4396) A thief was brought to the Prophet four times and his punishments were amputations of the right hand, the left foot, the left hand and then the right foot On the fifth occasion the Prophet had him killed "We then dragged him and cast him into a well and threw stones over him." (How did he steal without hands or feet?)
For more "Thievery and Prophet Muhammad"