The Earliest Written Laws, Long Before the Bible

Legal codes were common in the ancient Middle East, with the first known example of a legal code in recorded history being the Code of Urukagina (2,380-2,360 BC). Urukagina was a ruler of the city-state Lagash in Mesopotamia, who assumed the title of king. His legal code instigated reforms which meant that "The widow and the orphan were no longer at the mercy of the powerful man". He did claim to be divinely inspired, however.
Fragment of an inscripted clay cone of Urukagina
Another legal code, dating back to about 1772 BCE, is the Code of Hammurabi.
The more than 282 laws were carved on the stone pillar by order of the sixth Babylonian King Hammurabi, who ruled the Babylonian Empire from 1792-50 B.C.E.
Hammurabi, was the chief lawmaker responsible for these laws, which provided a code for people to live by. And because this city-state conquered many diverse tribes, these rules helped the different groups live together in unity. However, members of different classes received different punishments.

The laws are extensive and relate to such matters as property, rights of landowners, merchants and slaves. Some rules were harsh:

If anyone is committing a robbery and is caught, then he shall be put to death

and some were incredibly reasonable:

If anyone owe a debt for a loan, and a storm prostrates (kills) the grain, or the harvest fail, or the grain does not grow for lack of water, in that year he need not give his creditor any grain; he washes his debt-tablet in water and pays no rent for this year.

Other things covered in the code are matters like marriage and divorce, wages for work and how much doctors should receive as payment. Another famous law of Hammurabi was "an eye for an eye, a tooth for a tooth".
There is evidence that the Code of Hammurabi is based on a more ancient system of laws which were updated and expanded by Hammurabi's orders. There are also some similarities between the later Ten Commandments and the laws of Hammurabi.


Books To Read

The Science of Good and Evil: Why People Cheat, Gossip, Care, Share, and Follow the Golden Rule, by Michael Shermer on ethics and evolutionary psychology.