The opening of the poem is rather obscure. A fragment exists which seems to be its earliest lines, a sort of prologue indicating the benefits accruing to those who read the epic. Another fragment thought to belong to this work is about a grievous siege of the city of Erech; but as no mention of Gilgamesh appears, it is doubtful whether the fragment really forms a part of the poem. When Gilgamesh is first introduced in the mutilated text it is as the semi-divine king of Erech, a tyrannous monarch whose people groan beneath the weight of his oppression. There is nothing to indicate how he reached the throne, whether he was a native prince or a conqueror. Like the sun he typifies, his birth is shrouded in mystery. His mother, Rimat-belit, is a priestess of the cult of Shamash; it is not from her that he has received his strain of divinity. His father, strangely enough, is not once mentioned, and we are left to conjecture that he was the offspring of a god, probably of the sun-god himself, whose worshipper and protégé he is.
The people of Erech at length rebel against his cruel treatment, calling on the gods to create a hero to subdue him. The divine beings hearkened, and the goddess Aruru made Eabani, the wild man, from a piece of clay. Eabani haunts the mountains and desolate places, herding with the gazelles as one of them, and it is in this condition that Tsaidu, the hunter, finds him, whether by accident or design is not clear. Tsaidu, after trying in vain to capture him, returns with news of him to Gilgamesh, who, evidently guessing that the wild man was intended by the gods for his downfall, dispatches Tsaidu once more in search of him. This time the huntsman is accompanied by the temple-woman Ukhut, whose snares Gilgamesh trusts will be more effective than those of Tsaidu. Like Adam in the Garden of Eden, the wild man falls before the wiles of a woman, and is led in triumph to Erech, with whose monarch he establishes a close friendship, thus in a measure thwarting the designs of the gods.
In the IInd tablet we find Eabani somewhat dissatisfied with his position at Erech, and lamenting his lost freedom; but the god Shamash appears to him in a dream and induces him to remain. The two heroes, Gilgamesh and Eabani, project an expedition against Khumbaba, the monster who guards the forest of cedars, and in the IIIrd tablet they obtain the patronage of Shamash for their undertaking, through the good offices of Rimat-belit.
The fearsome aspect of Khumbaba (identified by some writers with an Elamite dynasty which flourished more than two thousand years before our era) is portrayed in the IVth tablet, while the Vth relates the episode of the heroes' approach to the forest of cedars. The portion of the text dealing with the combat is no longer extant, but we gather that the monster is overcome and slain. The encounter with Khumbaba appears to be symbolical of the conflict between light and darkness.
The VIth tablet embodies a myth of different character, representing, perhaps, the wooing of the sun-god, the god of the spring-time, by Ishtar, the patron deity of fertility and of the renewal of vegetation on the earth. Returning from his expedition to the forest of cedars, Gilgamesh lays aside his armour and stained garments and robes himself with becoming state. The goddess Ishtar, beholding him, loves him, and desires him for her bridegroom. "Come, Gilgamesh," she says, "and be thou my bridegroom! I am thy vine, thou art its bond; be thou my husband, and I will be thy wife," and so on, with many fair promises and inducements. But Gilgamesh will have none of her proffered favours. In a speech replete with mythic allusions he taunts her with her treatment of former lovers—of Tammuz the bridegroom of her youth, of Alala the eagle, of a "lion perfect in might" and a "horse glorious in battle," of the shepherd Tabulu and the gardener Isullanu. To all these has she meted out cruel tortures; "and yet," says Gilgamesh, "thou lovest me that thou mayest make me as they are." Ishtar in mingled rage and shame appeals to her father Anu to send a great bull against the hero, and Anu at length consents to do so. However, Gilgamesh and Eabani succeed in slaying the divine animal, while Eabani still further incenses the goddess by his contemptuous treatment of her. After the overthrow of the celestial bull the heroes return to Erech. Up to this point their victorious career has not received a single check; but just as the sun when he reaches the zenith begins to decline in strength, so the might of the two heroes begins to wane after the middle of the epic.
In the VIIth tablet the death of Eabani is foretold to him in a vision. The temple maiden Ukhut (cursed by him in his first bitterness at the loss of freedom, and now dead) appears to him, and in a passage beginning, "Come, descend with me to the house of darkness, the abode of Irkalla," describes the gloomy and wretched aspect of the Netherworld. Soon afterward Eabani becomes ill, no doubt through the malignance of the goddess Ishtar. This tablet and the following, which recounts the death of Eabani, are in a very mutilated condition.
The IXth tablet opens with the lament of Gilgamesh for his deceased friend. "Must I die like Eabani?" asks the hero, and a great dread comes upon him, so that he resolves to go to the abode of his ancestor, Ut-Napishtim, the Babylonian Noah, who has been admitted into the pantheon, and, he trusts, will unveil for him the secret of immortality. It must be remembered that on this journey thitherward Gilgamesh, in his mythical character of sun-god, is travelling downward from the zenith. In due course he reaches the Mountain of the Sunset, lying on the western horizon, and when he has passed its portals, guarded by scorpion-men, he passes through a region of darkness which takes him twenty-four hours to traverse.
The Xth tablet brings him to the seashore, and here he meets with Sabitu, goddess of the sea, who directs him to Ut-Napishtim's ferryman, Arad-Ea. After some persuasion the ferryman consents to row him across the waters of death to the abode of his ancestor. Arrived at the farther shore, the hero (who has meanwhile contracted a sore disease) remains sitting in the boat till Ut-Napishtim comes down to the strand. The survivor of the flood is greatly surprised to see that a mortal man has crossed the dark sea in safety, and he demands to know his errand. Gilgamesh makes known the object of his quest (to learn the secret of perpetual life), whereupon the listener on the shore looks grave, and points out to him that death is the common lot of all men.
To explain how he himself obtained immortality and deification, Ut-Napishtim relates the Babylonian version of the ubiquitous flood-story, which occupies the first portion of the XIth tablet. The flood was decreed, according to this version, by the gods who dwelt in the ancient city of Shurip-pak. "Their hearts prompted the great gods to send a deluge," says Ut-Napishtim naively, and no other cause is assigned for the disaster. Ut-Napishtim was evidently a favourite with Ea, lord of the deep; he instructed him in a vision how to build a ship in which he and his household might escape. To allay the suspicions of the populace he had to give as the reason for his preparations that he was hated by Bel and was therefore disposed to quit the realms of that deity and repair to the domains of Ea. The building, launching, and loading of the ship occupied seven days, and at eventide on the seventh Ut-Napishtim with his family and household entered the ship, and the torrential rains then commenced. For a season all was storm and chaos, so that even the gods were afraid. On the seventh day the tempest ceased, and finally the ship came to rest on Mount Nitsir. To discover whether the waters were abating this Babylonian Noah sent out a dove, then a swallow, but both returned to the ship; after a space he sent out a raven, and the raven drew near, "wading and croaking," but did not come back. Then Ut-Napishtim and all his household came out and offered a libation and burnt incense on the mountain-peak. The gods descended and hovered round him, and the lady of the gods swore by her necklace of lapis lazuli (an amulet) that she would not forget the days of the deluge. Bel, who seems to have been the prime mover in the destruction of mankind, was wroth when he discovered the survivors, but at length, on the intervention of the other gods, he decided to raise Ut-Napishtim and his wife to the status of divinities and admit them to the council of the gods. After this, the pair were taken away and made to dwell at 'the mouth of the rivers.'
His recital ended, Ut-Napishtim undertook to cure Gilgamesh of his disease, and for that purpose directed him to a magic spring of healing virtue. The hero, once more strong and healthy, returned to his ancestor's dwelling and again demanded the secret of life. Ut-Napishtim, though he had previously pointed out the hopelessness of the quest, now told Gilgamesh how he might obtain the plant of life, and with Arad-Ea for his pilot the hero set out. He was successful in finding the magic plant, but ere he could make use of it a serpent-monster stole it from him, and with his quest still unfulfilled he was obliged to return to Erech.