Dewa Muda wakes up from a dream, and tells his two attendants (penqasuh or peran ) that in the dream an old man or woman appeared to him. This person asked the prince to go into the ancestral forest to hunt for a golden deer. The pengasuh go to summon the royal astrologer (wak nujum). The astrologer provides Dewa Muda with an interpretation. Dewa Muda is told that he must carry out the instructions of the person who appeared in his dream. Failure to do so can lead to calamity.
Dewa Muda leaves for the forest with his entourage. The spirits of the forest are invoked and propitiatory offerings made them. The pengasuh go ahead to look for the golden deer, and the hunt begins as soon as the deer is cited. Mysteriously the deer disappears. The hunting dogs are lost in the forest. Dewa Muda and the pengasuh look for water. The servants have discovered a pond for Dewa Muda’s bath. Thee finds a seven‑ petaled flower floating in the pond. On its petals there is a message: “If you wish to find me, come up into the skies.”
Dewa Muda gets a violent urge to go up into the heavens. The Pengasuh advise him that this is not really possible, since he has no wings and is not a bird. Their immediate problem is to find a way out of the forest. The elder Peran advises Dewa Muda to make a vow. Dewa Muda makes the vow: If he successfully returns to the palace of his mother, Tuan Puteri Selindungan Bulan, he will fly a golden kite. The forest brightens immediately and the homeward journey begins. The Peran tua informs the prince of the existence of a golden kite which once belonged to Dewa Muda’s father, Tuk Raja Jawa, and is now in the keeping of his mother. They plan a ruse to acquire the kite from Tuan Puteri Selindungan Bulan.
Dewa Muda’s ruse to acquire the kite works. The kite is repaired and taken to the open field (Padang Luas Sajauhana Padang). The prince seeks the assistance from a spirit of the skies, to fly the kite into the heavens. They are both delighted, hearing the sound made by the kite, as it hangs, suspended in the skies. When it is time to bring the kite down they discover that it is stuck; it will move neither higher nor lower. Dewa Muda gets a strong urge to go up into the skies to get it and will not go home without the ancestral kite. The spirit, failing to dissuade the prince from the mission, finally agrees to help the prince go up into the skies. Dewa Muda, is frightened, but there is no untoward incident, and they reach the sky coutry, Kayangan. In a heavnly gareden they discover fruits, which they eat and then go to sleep.
The sky princess, Tuan Puteri Ratna Mas, and her attendants (inang) decide to go into their garden to pick flowers and to eat fruits. They discover Dewa Muda and Awang Sejambul Lebat. The two sleepers are awakened and some argument ensues between the youngest attendant (inang bonqsu) of Tuan Puteri Ratna Mas and the two intruders regarding the theft of fruits. Puteri Ratna Mas and Dewa Muda fall in love. As a sign of hospitality, the sky‑princess offers Dewa Muda betel leaves. Dewa Muda eats the first quid, which he finds is sweet, proceeds to the second which is bitter, and finally eats the third which causes drowsiness. He goes to sleep. The inang bongsu takes his keris as a compensation for the fruit eaten by Dewa Muda and Awang Sejambul Lebat. Tuan Puteri Ratna Mas and the inanq return to their palace.
Tuan Puteri Ratna Mas comes to meet Dewa Muda on the pretext of wanting to return his weapon. She invites Dewa Muda to her room and takes him in with her in the form of a white flower that she puts in her hair. Once inside the palace, the prince returns to his normal shape. The princess instructs Inang Bongsu to bring more food than usual for her, saying she would like to feast the spirits of the palace (hantu anjung). Inang Bongsu obeys but gets suspicious when the princess does not allow her to enter her room with the food. Later, she peeps through the key‑hole and discovers the truth. She notices that Dewa Muda leaves the palace as a white mouse every time he has been in the palace with Tuan Puteri Ratna Mas. One day she places an arrow at the window, and Dewa Muda is pierced by it. He is transformed into his real shape, and lamenting, crawls to see his companion, the heavenly spirit. The prince dies.
The spirit knows that this is the doing of Inang Bongsu, but is quite helpless. He brings Dewa Muda down to earth and leaves the dead prince with his mother, Tuan Puteri Selindungan Bulan, indicating that only a certain shaman (bomoh) can bring the prince back to life. This bomoh, he says, will seek the prince out.
The search for a bomoh begins. When all seems to have failed, Tuan Puteri Selindungan Bulan orders Dewa Muda’s body to be placed in a coffin. Soon it is on its way to the lying‑instate. Along the way, the royal attendants in charge of the procession meet two persons who appear to be hermaphrodites and claim to be bomoh. When asked if they can revive the dead prince, they answer that they can only try, giving no guarantee. They are invited to make the effort. For the attempted revival all other persons are sent away to wait at some distance. The healing ritual starts, and soon Dewa Muda begins to revive. The two bomoh leave before Dewa Muda is fully conscious. A message is written for him on the blade of his keris which is placed under his pillow. Dewa Muda awakens, as if from a long sleep, discovers the keris and reads the inscription: “If you wish to see me, come up to the skies.” He realises that he has been visited by Tuan Puteri Ratna Mas. He gets a mad desire to go up into the skies.
Dewa Muda summons his spirit companion, who carries the prince into the heavens. On earth, Tuan Puteri Selindungan Bulan is informed of Dewa Mudals revival and flight into the heavens. Dewa Muda, upon reaching the heavens, meets Tuan Puteri Ratna Mas in the garden as before.
There are two major versions of the ending of Dewa Muda:
1. Dewa Muda and Tuan Puteri Ratna Mas marry. Dewa Muda spends half his time in the skies with her and the other half on earth with Tuan Puteri Selindungan Bulan.
2. Dewa Muda proposes marriage and Tuan Puteri Ratna Mas accepts. Before they can proceed any further, however, a heavenly voice prohibits them from marrying. They are both the children of the same father, a god. They part from each other. Dewa Muda returns to earth.