When the Heavenly Court learned that Sun Wukong had caused great havoc in Heaven, the Jade Emperor was furious and immediately appointed Heavenly King Li Jing of the Pagoda as the Demon-Subduing Grand Marshal, Prince Nezha as the Third Altar Ocean-Convening Deity, mustered a hundred thousand heavenly troops and generals, set up eighteen layers of heavenly nets, and went to the Mountain of Flowers and Fruit to capture the demon monkey. King Li received the decree and set off with his troops at once. The two battle formations faced each other. Sun Wukong showed no fear, wielded his Ruyi Jingu Bang, and fought fiercely with Nezha for thirty rounds, with neither side gaining the upper hand.
All the heavenly troops and generals charged forward together. Sun Wukong split his body into shadows and transformed all the monkeys into identical copies of himself, fighting so fiercely that heaven and earth grew dark. Neither Prince Nezha nor Muzha could withstand him. When the Bodhisattva Guanyin heard the report, she recommended Erlang Shen to the Jade Emperor—the Jade Emperor's nephew, who possessed vast magical powers. The Jade Emperor approved the suggestion and summoned Erlang Shen and the brothers of Meishan to come and assist. Erlang Shen and Sun Wukong—one with countless transformations, the other with his cloud-somersault speed—fought from the Mountain of Flowers and Fruit to the Mouth of Guan River, and then back again. Erlang Shen transformed into a great vulture; Wukong turned into a sparrow, then into a fish, and then into a temple. The two kept changing forms one after the other, enjoying the battle immensely.
Just as Erlang Shen and Sun Wukong were locked in fierce combat on the Mountain of Flowers and Fruit, Taishang Laojun and the Bodhisattva Guanyin watched from outside the Southern Heavenly Gate. Seeing that the two were evenly matched, Laojun quietly took out his Diamond Cudgel and threw it down toward the Mountain of Flowers and Fruit, hitting Sun Wukong square on his helmet. Wukong stumbled and fell. Erlang Shen's Howling Celestial Dog seized the opportunity to pounce forward and bite him firmly on the leg. All the gods swarmed up, captured Sun Wukong alive, pierced his shoulder blades with hooked knives, tied him up tightly, and escorted him back to the Heavenly Court.
When the Jade Emperor saw that Sun Wukong had been captured, he ordered him to be executed at the Demon-Slaying Platform. Neither swords, axes, thunder, nor fire could harm him in the slightest. It turned out that by consuming the golden elixir and celestial wine, he had become a body as indestructible as diamond. Taishang Laojun then petitioned the Jade Emperor to bring Wukong back to the Tushita Palace, throw him into the Eight Trigram Furnace, and refine him with the Samadhi True Fire until he was reduced to ashes. Forty-nine days later, Lord Lao Zi opened the furnace to check. Who would have thought that not only was Sun Wukong not dead, but he had actually developed fiery golden eyes, kicked over the Eight Trigrams Furnace, pulled out his Ruyi Jingu Bang, and again caused havoc in the Heavenly Palace.