Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:2:178

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. But whoever overlooks from his brother anything, then there should be a suitable follow-up and payment to him with good conduct. This is an alleviation from your Lord and a mercy. But whoever transgresses after that will have a painful punishment.  

O you who believe, prescribed, made obligatory, for you is retaliation, on equal terms, regarding the slain, both in the attributes ˹of the one slain˺ and in the action involved; a free man, is killed, for a free man, and not for a slave; and a slave for a slave, and a female for a female. The Sunna makes it clear that a male may be killed ˹in retaliation˺ for a female, and that religious affiliation should be taken into account also, so that a Muslim cannot be killed in return for an disbeliever, even if the former be a slave and the latter a free man. But if anything, of the blood, is pardoned any one, of those who have slain, in relation to his brother, the one slain, so that the retaliation is waived (the use of the indefinite shay’un, ‘anything’, here implies the waiving of retaliation through a partial pardon by the inheritors ˹of the slain˺; the mention of akhīh ˹‘his brother’˺ is intended as a conciliatory entreaty to pardon and a declaration that killing should not sever the bonds of religious brotherhood; the particle man, ‘any one’, is the subject of a conditional or a relative clause, of which the predicate is ˹the following, fa’ittibā‘un˺) let the pursuing, that is, the action of the one who has pardoned in pursuing the killer, be honourable, demanding the blood money without force. The fact that the ‘pursuing’ results from the ‘pardoning’ implies that one of the two ˹actions˺ is a duty, which is one of al-Shāfi‘ī’s two opinions here. The other ˹opinion˺ is that retaliation is the duty, whereas the blood money is merely compensation ˹for non-retaliation˺, so that if one were to pardon but not name his blood money, then nothing ˹happens˺; and this ˹latter˺ is the preferred ˹opinion˺. And let the payment, of the blood money by the slayer, to him, the pardoner, that is, the one inheriting ˹from the slain˺, be with kindliness, without procrastination or fraud; that, stipulation mentioned here about the possibility of retaliation and the forgoing of this in return for blood money, is an alleviation, a facilitation, given, to you, by your Lord, and a mercy, for you, for He has given you latitude in this matter and has not categorically demanded that one ˹of the said options˺ be followed through, in the way that He made it obligatory for Jews to retaliate and for Christians to ˹pardon and˺ accept blood money; and for him who commits aggression, by being unjust towards the killer and slaying him, after that, that is, ˹after˺ pardoning — his is a painful chastisement, of the Fire in the Hereafter, or of being killed in this world.
القرآن:٢:١٧٨

يَا أَيُّهَا الَّذِينَ آمَنُوا كُتِبَ عَلَيْكُمُ الْقِصَاصُ فِي الْقَتْلَى ۖ الْحُرُّ بِالْحُرِّ وَالْعَبْدُ بِالْعَبْدِ وَالْأُنْثَىٰ بِالْأُنْثَىٰ ۚ فَمَنْ عُفِيَ لَهُ مِنْ أَخِيهِ شَيْءٌ فَاتِّبَاعٌ بِالْمَعْرُوفِ وَأَدَاءٌ إِلَيْهِ بِإِحْسَانٍ ۗ ذَٰلِكَ تَخْفِيفٌ مِنْ رَبِّكُمْ وَرَحْمَةٌ ۗ فَمَنِ اعْتَدَىٰ بَعْدَ ذَٰلِكَ فَلَهُ عَذَابٌ أَلِيمٌ  

{يا أيها الذين منوا كُتب} فرض {عليكم القصاص} المماثلة {في القتلى} وصفا وفعلا {الحر} ولا يقتل بالعبد {والعبد بالعبد والأنثى بالأنثى} وبيَّنت السنة أن الذكر يقتل بها وأنه تعتبر المماثلة في الدين فلا يقتل مسلم ولو عبدا بكافر ولو حرا {فمن عفي له} من القاتلين {من} دم {أخيه} المقتول {شيء} بأن ترك القصاص منه، وتنكيرُ شيء يفيد سقوط القصاص بالعفو عن بعضه ومن بعض الورثة وفي ذكر أخيه تعطُّف داع إلى العفو وإيذان بأن القتل لا يقطع أخوة الإيمان ومن مبتدأ شرطية أو موصولة والخبر {فاتِّباع} أي فعل العافي إتباع للقاتل {بالمعروف} بأن يطالبه بالدية بلا عنف، وترتيب الإتباع على العفو يفيد أن الواجب أحدهما وهو أحد قولي الشافعي والثاني الواجب القصاص والدية بدل عنه فلو عفا ولم يسمها فلا شيء ورجح {و} على القاتل {أداء} الدية {إليه} أي العافي وهو الوارث {بإحسان} بلا مطل ولا بخس {ذلك} الحكم المذكور من جواز القصاص والعفو عنه على الدية {تخفيف} تسهيل {من ربكم} عليكم {ورحمة} بكم حيث وسَّع في ذلك ولم يحتم واحدا منهما كما حتم على اليهود القصاص وعلى النصارى الدية {فمن اعتدى} ظلم القاتل بأن قتله {بعد ذلك} أي العفو {فله عذاب أليم} مؤلم في الآخرة بالنار أو في الدنيا بالقتل.

See similar narrations below:

Collected by Bukhārī, Nasāʾī
bukhari:4498al-Ḥumaydī > Sufyān > ʿAmr > Mujāhid > Ibn ʿAbbās

The law of Qisas (i.e. equality in punishment) was prescribed for the children of Israel, but the Diya (i.e. blood money was not ordained for them). So Allah said to this Nation (i.e. Muslims): "O you who believe! The law of Al-Qisas (i.e. equality in punishment) is prescribed for you in cases of murder: The free for the free, the slave for the slave, and the female for the female. But if the relatives (or one of them) of the killed (person) forgive their brother (i.e. the killers something of Qisas (i.e. not to kill the killer by accepting blood money in the case of intentional murder)----then the relatives (of the killed person) should demand blood-money in a reasonable manner and the killer must pay with handsome gratitude. This is an allevitation and a Mercy from your Lord, (in comparison to what was prescribed for the nations before you). So after this, whoever transgresses the limits (i.e. to kill the killer after taking the blood-money) shall have a painful torment." (2.178)  

البخاري:٤٤٩٨حَدَّثَنَا الْحُمَيْدِيُّ حَدَّثَنَا سُفْيَانُ حَدَّثَنَا عَمْرٌو قَالَ سَمِعْتُ مُجَاهِدًا قَالَ سَمِعْتُ ابْنَ عَبَّاسٍ ؓ يَقُولُ كَانَ فِي بَنِي إِسْرَائِيلَ الْقِصَاصُ وَلَمْ تَكُنْ فِيهِمُ الدِّيَةُ فَقَالَ

اللَّهُ تَعَالَى لِهَذِهِ الأُمَّةِ {كُتِبَ عَلَيْكُمُ الْقِصَاصُ فِي الْقَتْلَى الْحُرُّ بِالْحُرِّ وَالْعَبْدُ بِالْعَبْدِ وَالأُنْثَى بِالأُنْثَى فَمَنْ عُفِيَ لَهُ مِنْ أَخِيهِ شَىْءٌ} فَالْعَفْوُ أَنْ يَقْبَلَ الدِّيَةَ فِي الْعَمْدِ {فَاتِّبَاعٌ بِالْمَعْرُوفِ وَأَدَاءٌ إِلَيْهِ بِإِحْسَانٍ} يَتَّبِعُ بِالْمَعْرُوفِ وَيُؤَدِّي بِإِحْسَانٍ {ذَلِكَ تَخْفِيفٌ مِنْ رَبِّكُمْ} وَرَحْمَةٌ مِمَّا كُتِبَ عَلَى مَنْ كَانَ قَبْلَكُمْ {فَمَنِ اعْتَدَى بَعْدَ ذَلِكَ فَلَهُ عَذَابٌ أَلِيمٌ} قَتَلَ بَعْدَ قَبُولِ الدِّيَةِ  

nasai:4781al-Ḥārith b. Miskīn > Sufyān > ʿAmr > Mujāhid > Ibn ʿAbbās

"There was Qisas among the Children of Israel, but Diyah was unknown among them. Then Allah, the Mighty and Sublime, revealed: "Al-Qisas (the law of equality in punishment) is prescribed for your in case of murder: the free for the free, the slave for the slave, and the female for the female." Up to His saying: "But if the killer is forgiven by the brother 9or the relatives) of the killed against blood money, then adhering to it with fairness and payment of the blood money to the heir should be made in fairness."[2] Forgiveness means accepting the Diyah in the case of deliberate killing. Adhering to it in fairness means asking him to pay the Diyah in a fair manner, and payment in fairness means giving the Diyah in a fair manner. This is and alleviation and a mercy from you Lord,[1] means: This is easier thanthat which was prescribed for those who came before you, which was Qisas and not Diyah."  

النسائي:٤٧٨١قَالَ الْحَارِثُ بْنُ مِسْكِينٍ قِرَاءَةً عَلَيْهِ وَأَنَا أَسْمَعُ عَنْ سُفْيَانَ عَنْ عَمْرٍو عَنْ مُجَاهِدٍ عَنِ ابْنِ عَبَّاسٍ قَالَ

كَانَ فِي بَنِي إِسْرَائِيلَ الْقِصَاصُ وَلَمْ تَكُنْ فِيهِمُ الدِّيَةُ فَأَنْزَلَ اللَّهُ ﷻ { كُتِبَ عَلَيْكُمُ الْقِصَاصُ فِي الْقَتْلَى الْحُرُّ بِالْحُرِّ وَالْعَبْدُ بِالْعَبْدِ وَالأُنْثَى بِالأُنْثَى } إِلَى قَوْلِهِ { فَمَنْ عُفِيَ لَهُ مِنْ أَخِيهِ شَىْءٌ فَاتِّبَاعٌ بِالْمَعْرُوفِ وَأَدَاءٌ إِلَيْهِ بِإِحْسَانٍ } فَالْعَفْوُ أَنْ يَقْبَلَ الدِّيَةَ فِي الْعَمْدِ وَاتِّبَاعٌ بِمَعْرُوفٍ يَقُولُ يَتَّبِعُ هَذَا بِالْمَعْرُوفِ وَأَدَاءٌ بِإِحْسَانٍ وَيُؤَدِّي هَذَا بِإِحْسَانٍ { ذَلِكَ تَخْفِيفٌ مِنْ رَبِّكُمْ وَرَحْمَةٌ } مِمَّا كُتِبَ عَلَى مَنْ كَانَ قَبْلَكُمْ إِنَّمَا هُوَ الْقِصَاصُ لَيْسَ الدِّيَةَ