Gilgamesh is a powerful king who is dissatisfied with the fact that humans must eventually die. He sets out on a quest for immortality, and he eventually learns that it is not possible for humans to achieve. However, he also learns that there are other things that are more important than immortality, such as friendship, love, and wisdom.
The moral lesson in the Epic of Gilgamesh is that humans should not waste their time searching for immortality. Instead, they should focus on living their lives to the fullest and enjoying the time they have.