O you who acknowledge, equivalent execution has been decreed for you in the cases of killings: the free for the free, the slave for the slave, and the female for the female. Whoever is forgiven anything by his brother, then it is to be followed with good deeds and kindness towards him; that is alleviation from your Lord, and a mercy. Whoever transgresses after that, he will have a painful retribution.
Translation endnotes
[2:178-179] The Quran does not encourage the death penalty. Various rules are put in place to save lives, including the lives of murderers. The family of the victim might be satisfied with monetary compensation, which is encouraged by the Quran. Furthermore, the death penalty is not applicable to every murder case. For instance, if a woman kills a man or vice versa, the murderer cannot be sentenced to death; instead, the convict will be punished by society with a lighter punishment. If the murderer is not deemed a danger to society, monetary compensation or mandatory work might be more useful, productive, and rehabilitative than a prison sentence. The death penalty, like all criminal penalties, is not imposed and carried out by individuals, but by society and in accordance with accepted procedural rules. The socalled "honor killing" is a practice of ignorant and dishonorable people, and has nothing to do with islam.