Similarities have been noted with the Law of Moses. For example in the International Standard Bible Encyclopedia parallels are identified for Exodus 21:2, 15, 18, 22, 24, 28-32; 22:7,10; Leviticus 19:35f; 20:10; 24:19f; 25:39f; Deuteronomy 19:16f; 21:15f, 18f; 22:22; 24:1, 7.
Legal codes from ancient history can be helpful in understanding why specific laws existed. They can show us that a certain way of thinking was more widespread in the ancient world. It is claimed that Moses borrowed from Hammurabi because the latter antedates Moses. Other legal codes include those of Ur-Nammu and Eshnunna.
There is no intrinsic problem with the Bible having parallels to a prior code. The parallels may be because similar issues were being faced by the community. And the Bible claims to be historical, thus it interacts with nations surrounding it. God can approve of the practices of other nations or disapprove of them. Frequently we see the prophets condemning Israel for her actions which are worse than their pagan neighbours. Because God may approve or disapprove of a nations laws it is important to look at the differences as well as the similarities.
Nevertheless, I am not convinced that Hammurabi antedates Moses. I have previously mentioned my disagreement with secular ancient chronology.
Hammurabi was a king of Babylonia. Dating of the reign of Hammurabi is difficult and as has been noted several times, the chronology of ancient history is highly dependant on the chronology of Egypt. The chronology of the Egyptians is known to be a mess, even by those holding to the traditional dating. Alternate secular Egyptian dating systems have been proposed. Peter James, author of Centuries of Darkness states,
Numerous synchronisms have been drawn between Egypt and Mesopotamia, but many of these are based on unproved assumptions. Of those that are genuine, closer examination reveals that in many cases Mesopotamian chronology is actually dependent on Egyptian - and not the other way around. For example it is clear (Brinkman 1976) that the list of kings for the late Kassite period in Babylonia, conventionally 14th-13th centuries BC, has been heavily restored from Egyptian and Hittite evidence. (Hittite dating is directly dependent on that of Egypt.)Scripture alone demands an Egyptian rewrite.
My knowledge of Babylonian history is limited. I am going to propose an alternative date for the code based on scriptural considerations and various secular synchronisms.
Pinches dates Hammurabi c. 2000 BC. Van De Mieroop dates him c. 1800 BC. Other suggestions based on shorter chronology suggest c. 1700 BC. Based on king lists Hammurabi son of Sin-mubalit son of Abil-Sin belonged to the First Babylonian Dynasty.
Following traditional dating we have the following (approximate) claims
- 1750 BC in traditional Egyptian chronology corresponds to the 12th and 13th Egyptians dynasties
- The first Babylonian dynasty ended with the fall of Babylon
- The fall of Babylon is dated c. 1500–1600 BC which corresponds to the beginning of the 18th Egyptian dynasty
- The very earliest date for the beginning of the Egyptian dynasties is c. 2200 BC
- Moses led the exodus of the Israelites out from Egypt around the time of the 12th and 13th dynasties (which may also correspond to the 6th dynasty)
- The 18th dynasty was of some duration. The beginnings of which are possibly about the time of Samuel and Saul
While I am confident in the reduction of the date of the Hammurabi Code, I have not established significant synchronisms between Babylon and either Israel or Egypt. More data or a closer review of the data may lead to a more exact and more confident date.
This suggests that the the correspondence between the Hammurabi Code and the Law of Moses is unlikely due to the latter's dependence on the former. The Hammurabi Code may be dependant on the Mosaic Law based on chronological considerations alone. Both codes could relate to underlying customs of the Ancient Near East. Or they both could have some relationship to prior laws. Many who hold to the Mosaic authorship of Genesis propose Moses had access to more ancient Hebrew records.