No laws similar to these are found in the Old Testament.
The Penalty for Renouncing a Master
§ 282. If a slave shall say to his owner: “Thou art not my owner,” they shall make him submit as his slave, and shall cut off his ear.
This penalty reminds one of the boring of a slave’s ear (Exod. 21:6; Deut. 15:17) in token of perpetual slavery.
2. The Mosaic Code not Borrowed from the Babylonian; Different Underlying Conceptions.
A comparison of the code of Hammurapi as a whole with the Pentateuchal laws as a whole, while it reveals certain similarities, convinces the student that the laws of the Old Testament are in no essential way dependent upon the Babylonian laws. Such resemblances as there are arose, it seems clear, from a similarity of antecedents and of general intellectual outlook; the striking differences show that there was no direct borrowing. The primitive Semitic custom of an eye for an eye and a tooth for a tooth (Exod. 21:24; Lev. 24:20; Deut. 19:21) is made the basis of many penalties in the Babylonian code. (See §§ 196, 197, 200, 229, 230, etc.) The principle underlying it is found also in many other sections. These similarities only show that Babylonia had a large Semitic element in its population. Again, Hammurapi pictured himself at the top of the pillar on which these laws are written as receiving them from the sun-god ([Fig. 292]). The Bible tells us that Moses received the laws of the Pentateuch from Jehovah. The whole attitude of the two documents is, however, different. Hammurapi, in spite of the picture, takes credit, both in the prologue and in the epilogue of his code, for the laws. He, not Shamash, established justice in the land. Moses, on the other hand, was only the instrument; the legislation stands as that of Jehovah himself.
This difference appears also in the contents of the two codes. The Pentateuch contains many ritual regulations and purely religious laws, while the code of Hammurapi is purely civil. As has been already pointed out, the code of Hammurapi is adapted to the land of the rivers, and to a highly civilized commercial people, while the Biblical laws are intended for a dry land like Palestine, and for an agricultural community that was at a far less advanced stage of commercial and social development.
Religion is, however, not a matter of social advancement only. In all that pertains to religious insight the Pentateuch is far in advance of Hammurapi’s laws.