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:5:45

And We ordained for them therein a life for a life, an eye for an eye, a nose for a nose, an ear for an ear, a tooth for a tooth, and for wounds is legal retribution. But whoever gives ˹up his right as˺ charity, it is an expiation for him. And whoever does not judge by what Allah has revealed - then it is those who are the wrongdoers.  

And therein, in the Torah, We prescribed, We made obligatory, for them that a life, be slain in return, for a life, if it has slain one; and an eye, should be gouged out, for an eye, and a nose, is to be cut off, for a nose, and an ear, is to be amputated, for an ear, and a tooth, should be pulled out, for a tooth (a variant reading has the last four ˹nouns˺ in the nominative); and for wounds (read wa’l-jurūhu or wa’l-jurūha) retaliation, that is, the person is entitled to retaliate if this is feasible, as in the case of a hand or a leg; but in cases where one is not able to ˹retaliate˺, this is left to arbitration. Although this stipulation was prescribed for them, it is established in our Law; but whoever forgoes it, that is, retaliation, out of charity, able to restrain himself, then that shall be an expiation for him, of what he has done ˹of other sins˺. Whoever does not judge according to what God has revealed, in the matter of retaliation and otherwise, those are the evildoers.
القرآن:٥:٤٥

وَكَتَبْنَا عَلَيْهِمْ فِيهَا أَنَّ النَّفْسَ بِالنَّفْسِ وَالْعَيْنَ بِالْعَيْنِ وَالْأَنْفَ بِالْأَنْفِ وَالْأُذُنَ بِالْأُذُنِ وَالسِّنَّ بِالسِّنِّ وَالْجُرُوحَ قِصَاصٌ ۚ فَمَنْ تَصَدَّقَ بِهِ فَهُوَ كَفَّارَةٌ لَهُ ۚ وَمَنْ لَمْ يَحْكُمْ بِمَا أَنْزَلَ اللَّهُ فَأُولَٰئِكَ هُمُ الظَّالِمُونَ  

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

See similar narrations below:

Collected by Ḥākim
hakim:2928Abū ʿAbdullāh Muḥammad b. Yaʿqūb al-Ḥāfiẓ > Yaḥyá b. Muḥammad b. Yaḥyá al-Shahīd > Abū ʿAlī Muḥammad b. Muʿāwiyah al-Naysābūrī Bimakkah > Ibn al-Mubārak > Yūnus b. Yazīd > Abū ʿAlī b. Yazīd Akhī Yūnus b. Yazīd > al-Zuhrī > Anas

[Machine] The Prophet ﷺ recited, "And We ordained for them in that (Torah): A life for a life, an eye for an eye, a nose for a nose, an ear for an ear, a tooth for a tooth, and for wounds is legal retribution." (Surah Al-Ma'idah 5:45) "Muhammad bin Mu'awiyah is not among the conditions in this book."  

الحاكم:٢٩٢٨حَدَّثَنَاهُ أَبُو عَبْدِ اللَّهِ مُحَمَّدُ بْنُ يَعْقُوبَ الْحَافِظُ ثنا يَحْيَى بْنُ مُحَمَّدِ بْنِ يَحْيَى الشَّهِيدُ ثنا أَبُو عَلِيٍّ مُحَمَّدُ بْنُ مُعَاوِيَةَ النَّيْسَابُورِيُّ بِمَكَّةَ ثنا ابْنُ الْمُبَارَكِ عَنْ يُونُسَ بْنِ يَزِيدَ عَنْ أَبِي عَلِيِّ بْنِ يَزِيدَ أَخِي يُونُسَ بْنِ يَزِيدَ عَنِ الزُّهْرِيِّ عَنْ أَنَسٍ

أَنَّ النَّبِيَّ ﷺ قَرَأَ {أَنَّ النَّفْسَ بِالنَّفْسِ وَالْعَيْنَ بِالْعَيْنِ وَالْأَنْفَ بِالْأَنْفِ وَالْأُذُنَ بِالْأُذُنِ وَالسِّنَّ بِالسِّنِّ وَالْجُرُوحَ قِصَاصٌ} [المائدة 45] «مُحَمَّدُ بْنُ مُعَاوِيَةَ لَيْسَ مِنْ شَرْطِ هَذَا الْكِتَابِ»