O you who have believed, prescribed for you is legal retribution for those murdered - the free for the free, the slave for the slave, and the female for the female.1 But whoever overlooks from his brother [i.e., the killer] anything,2 then there should be a suitable follow-up and payment to him [i.e., the deceased's heir or legal representative] with good conduct. This is an alleviation from your Lord and a mercy. But whoever transgresses after that3 will have a painful punishment.
Translation: Saheeh International (English)
1 No one else should be executed in place of the killer.
2 By accepting compensation payment rather than execution.
O you who have faith in Allah and follow His Messenger, it is decreed for you that in cases where someone deliberately attacks and kills someone, the punishment for the murderer should be the same as their crime: the freeman killed for the freeman; the slave for the slave; and the female for the female. If the person killed had forgiven before his death, or his guardian has forgiven in return for the payment of blood money (a sum of money paid by the murderer in return for being pardoned), then the person who forgives should ask for the sum of money fairly, and not follow that up with insult or injury, and the murderer should pay the sum of money in a good way, without hesitation or delay. In allowing this forgiveness and the payment of the blood money your Lord makes things easier for you, and this is a mercy for the Muslim nation. Whoever attacks the murderer after his pardon and the acceptance of the blood money will receive a painful punishment from Allah.