There are a lot of people who obviously think this saying, and teaching came from Christianity, or more likely, from ancient Judaism. Some may even think it originated with Islam. None of this is true.
On page 171 of Most Comprehensive Origins of Cliches, Proverbs and Figurative Expressions you will find the following explanation:
eye for an eye and a tooth for a tooth, An
This is an ancient Babylonian philosophy and legal code called the Code of Hammurabi (1780 B.C.). ‘An eye for an eye’ is found in several passages in the Hebrew Bible, and refers to just punishment based on the crime. This principle has been a basic factor considered in the formation of laws of countries for thousands of years, including Judaism, ancient Roman law, British Common Law, and a consideration in the American Justice System.
Jesus, however, is quoted as saying in the ‘Sermon on the Mount,’ “You have heard that it was said, ‘An eye for an eye and a tooth for a tooth.’ But I say to you, Do not resist an evildoer. But if anyone strikes you on the right cheek, turn the other also.” (Mathew 5:38-39, RSV)
The sentiments of Jesus have been carried forward by modern non conformists.
Mahatma Gandhi said, “An-eye-for-an-eye-for-an-eye-for-an-eye … ends in making everybody blind.” – Louis Fischer, The Yale book of quotations, Fred R. Shapiro, 2006
Martin Luther King concurred with Gandhi when he later used this phrase in the context of racial violence: “The old law of an eye for an eye leaves everyone blind.” – The Words of Martin Luther King, Jr. by Coretta Scott King
This book, containing many hundreds of phrase, proverb and expression origins is available on Amazon worldwide in both paperback and Kindle e-book, as well as on http://stclairpublications.com.