Lex Talionis is Latin, and it means “the law of retaliation.” It comes from this passage in Exodus 21:23-25 (c.f. Lev. 24:19-20; Deut. 19:21):
But if there is any further injury, then you shall appoint as a penalty life for life, 24 eye for eye, tooth for tooth, hand for hand, foot for foot, 25 burn for burn, wound for wound, bruise for bruise.
In Shakespeare’s Merchant of Venice, a Jewish moneylender named Shylock lent money to Antonio. When he couldn’t pay him back, Shylock demanded that Antonio pay him what their contract demanded: a pound of his flesh! For the rest of the play, Shylock tries to pin down Antonio to cut a hunk of meat out of his side. Is this what is going on here in the OT law? Were the Jews supposed to literally pluck out another person’s eye ball or tooth for retribution?
First, this passage was not meant to be literal. The law commanded that the Jews were not to “take vengeance, nor bear any grudge against the sons of your people, but you shall love your neighbor as yourself” (Lev. 19:18 NASB). Clearly, turning the other cheek was not a NT invention; revenge was prohibited in ancient Israel.
Second, the context speaks against a literal interpretation. In verse 26, a servant could go free, if they were injured, and in verse 30, a ransom was given for damage. Moreover, when we consider the greater context of Scripture, we cannot find one example of lex talionis being literally practiced in the entire OT.
Third, lex talionis was for the purpose of protection, rather than the purpose of revenge. If you were hurt by someone, you could bargain until you felt like your retribution was fair. For example:
OFFENDED: “You plucked out my eye… give me yours!”
OFFENDER: “No! Take fifty bucks…”
OFFENDED: “Mmmm… I don’t think so. Not enough money. Give me that eyeball!”
OFFENDER: “Okay! Okay! Take a thousand!”
OFFENDED: “Mmmm… Okay, that sounds fair. Deal.”
In this way, the “eye for an eye” principle encouraged fair bargaining for injuries. It encouraged fair payment for fair damage.
Fourth, the Code of Hammurabi practiced lex talionis much differently (see principle four). The Code of Hammurabi had this legal principle (e.g. “bone for bone” “tooth for tooth”), but it didn’t count for aristocrats damaging slaves or servants. In addition, if a builder killed your kid, while working on your house, the Code of Hammurabi prescribed that the builder’s own kid should be killed as recompense (compare with Deut. 24:16)!
 The only possible exception is Deuteronomy 25:11-12. However, this is probably referring to justice “on the spot,” rather than later. It might be similar to a SWAT sniper shooting someone with a hostage. This might be the prevention of harm, rather than the retribution of harm. Copan argues that the Hebrew is actually referring to publicly shaving the woman’s pubic hair! That is, the woman was to be publicly humiliated for her actions. He makes a linguistic argument for this, but I don’t find this much better than the plain sense reading. It seems nearly just as bad and ultimately more bizarre! However, Copan also points out that this law was still ahead of the ANE at the time. He writes, “In fact, Middle Assyrian laws (around 1100 BC) present a similar scenario (in the case of injury to the man), though with far more drastic consequences. If a woman in a quarrel injured a man’s testicle, her finger was cut off. If the other testicle was injured, both of her eyes were gouged out.” See Copan, Paul. Is God a Moral Monster?: Making Sense of the Old Testament God. Grand Rapids, MI: Baker, 2011. 121-122.