- The Code of Hammurabi is a Babylonian legal text composed during 1755�1750 BC. It is the longest, best-organized, and best-preserved legal text from the ancient Near East. It is written in the Old Babylonian dialect of Akkadian, purportedly by Hammurabi, sixth king of the First Dynasty of Babylon. The primary copy of the text is inscribed on a basalt stele 2.25 m (7 ft 4+1/2 in) tall.