The King of Hell and the Dragon King both grumbled to the Jade Emperor about Sun Wukong's antics, causing a stir in the underworld and the palace of the dragon. The Jade Emperor was all set to send an army to sort out the monkey business when Tai Bai Jin Xing, the crafty star of Venus, chimed in with a clever plan: "Why not give him a meaningless title and keep him up here in the sky?" The Emperor nodded, and off went Tai Bai to invite Wukong to heaven.
Elated by the imperial invitation, Wukong left his mountain and followed Tai Bai to the Hall of Supreme Harmony. "Wukong's here," announced Tai Bai. "Who's Wukong?" asked the Jade Emperor. Wukong, not one for formalities, casually replied, "That'd be me." The gods were not amused.
Outwitted by the gods, Wukong was given the lowly job of stable hand, a fact he discovered only after a fortnight, much to his chagrin. Enraged, he brandished his Ruyi Jingu Bang, busted through the South Heavenly Gate, and returned to Flower-Fruit Mountain, crowning himself the "Great Sage Equal to Heaven."
The Jade Emperor, not amused by Wukong's return, dispatched Li Tianwang and his mighty son, Nezha, to bring him back. But Wukong, with his three heads and six arms, was more than a match for Nezha, who fled the battle with a bruised ego.
The Jade Emperor, fuming at the news, was ready to send more troops when Tai Bai suggested making Wukong a "Great Sage Equal to Heaven" in name only. The Emperor agreed, and peace was restored—for a while.
Wukong, the life of the heavenly party, enjoyed his fame but was soon bored. The Jade Emperor, fearing Wukong's mischief, put him in charge of the Penglai Peach Garden, a job that led to Wukong's own private peach feast.
When the time came for the annual Peach Banquet, Wukong, in a mischievous twist, gobbled up the ripest peaches and then transformed into a tiny creature to take a nap in the treetops. The seven fairies, tasked with picking the peaches, were caught off guard by the Great Sage's antics, leading to a comical chase.
Feeling snubbed by the lack of an invitation to the banquet, Wukong used his magic to immobilize the fairies, then headed to the Jade Pool to indulge in the celestial feast. After a hearty meal and a few too many cups of nectar, he stumbled into the Taoist temple, where he gobbled up the golden pills of immortality, realizing only after that he might have overdone it.
The Jade Emperor, furious at Wukong's latest stunt, ordered a massive manhunt. But even with the help of the mercurial Er Lang Shen, the gods were no match for Wukong. In a series of shape-shifting escapes, Wukong outwitted his pursuers, from soaring as a sparrow to diving as a fish, until he was finally cornered.
Captured and bound, Wukong was subjected to various tortures, all to no avail. The resourceful Laozi suggested melting Wukong in his Eight Trigrams Furnace. But instead of melting, Wukong emerged with fiery eyes that could see through illusions.
Armed with his Ruyi Jingu Bang, Wukong stormed the Hall of Miraculous Mist, challenging the Jade Emperor himself. The gods rallied to protect the Emperor, and the Jade Emperor called upon the Buddha for help.
The Buddha made a wager with Wukong: if he could leap out of the Buddha's palm, the heavens would be his. Wukong, overconfident, leaped into the Buddha's hand, only to realize he had been duped when he found his own message and scent on the Buddha's fingers.
In a swift move, the Buddha trapped Wukong beneath the Five Elements Mountain, sealing him with a talisman. The heavens rejoiced, and the Jade Emperor held a grand feast to honor the Buddha.
As the Buddha passed by the mountain, he showed mercy, instructing the mountain deities to watch over Wukong, who would be fed iron pellets and molten copper, until his five hundred years of penance were complete, and a savior would come.