Yes, Hammurabi, the sixth king of the First Babylonian Dynasty, worshipped multiple gods. The ancient Babylonian religion was polytheistic, meaning they believed in and worshipped many gods and goddesses. Hammurabi himself was known to honor and seek the favor of various deities, including Marduk, the chief god of Babylon, and Shamash, the god of justice.
Hammurabi’s famous Code of Hammurabi, one of the earliest and most complete written legal codes, begins with a prologue that invokes the gods and emphasizes that the laws were given to him by the gods to establish justice in the land. This further highlights the importance of religion and the worship of multiple gods in his reign.