The Yellow Robe Monster, seeing Sun Wukong's immense power, used demonic winds that stirred up sand and stones, blinding Wukong, and took the opportunity to escape back into his cave. Sun Wukong returned to the Kingdom of Baoxiang and informed them of the monster's abilities. Zhu Bajie, unconvinced, said: 'Brother, do not boast! Let me, Old Pig, go and confront him!' Sun Wukong laughed and replied: 'You fool, do not act so tough.' Zhu Bajie ignored him and went with Sha Wujing to the Wave-Moon Cave. The Yellow Robe Monster lured Zhu Bajie into the mountains, spewed poisonous smoke, captured him, and hung him inside the cave. Sha Wujing, unable to resist, fled back to the Kingdom of Baoxiang.
Seeing Sha Wujing return alone, Sun Wukong knew Zhu Bajie had been harmed and grew even angrier, so he decided to use strategy. He transformed into the image of Princess Baihuaxiu and infiltrated the Wave-Moon Cave. The Yellow Robe Monster suspected nothing and instead complained about the 'Horse Stable Keeper' (Sun Wukong) causing trouble. Sun Wukong pretended to be docile and tricked the Yellow Robe Monster into bringing out a golden elixir, claiming it could aid his cultivation. Sun Wukong seized the opportunity to trick the elixir into his mouth and fled the cave.
The Yellow Robe Monster discovered the golden elixir was stolen and realized he had been deceived, becoming furious. He flew out of the cave and encountered Sun Wukong again. The two fought once more, but the Yellow Robe Monster could not prevail and revealed his true form, which was the celestial star official, Kui Mulang (Wooden Wolf). He let out a wolf howl and spewed demonic fire from his mouth. Sun Wukong grappled with him, gradually gaining the upper hand. In the midst of the battle, the Great White Star (Taibai Jinxing) descended on an auspicious cloud and shouted: 'Kui Mulang, you vile beast, surrender now!' It turned out that the Jade Emperor had sent him down to capture the monster. When Kui Mulang saw the celestial deity, he dared not fight further and had to submit and confess his crimes.
After Kui Mulang was taken away by the celestial deity, Tang Sanzang's demonic aura dissipated, and he gradually regained human form. He opened his eyes and found himself within the Kingdom of Baoxiang. The king, overjoyed to see Tang Sanzang restored, quickly prepared a banquet in his honor and thanked Sun Wukong for the grace of subduing the demon.