When the Yellow Robe Monster saw Sun Wukong's immense magical powers, he summoned a demonic wind that stirred up flying sand and rocks, blinding Wukong, and took the chance to flee back into his cave. Sun Wukong returned to the Kingdom of Baoxiang and informed them of the monster's abilities. Zhu Bajie refused to accept this, saying, 'Brother, stop boasting! Let me, Old Pig, go and face him!' Wukong laughed: 'You idiot, don't try to act tough.' Bajie did not listen and went with Sha Wujing to the Crescent Moon Cave. The Yellow Robe Monster lured Bajie into the mountains, sprayed poisonous smoke, captured him, and hung him up inside the cave. Sha Wujing, unable to prevail, fled back to the Kingdom of Baoxiang.
Seeing Sha Wujing return alone, Sun Wukong knew Bajie had met with disaster, grew even more furious, and decided to use a clever ruse. He transformed himself into Princess Baixiu's likeness and infiltrated the Crescent Moon Cave. Unsuspecting, the Yellow Robe Monster instead complained about the 'Horse-Warming Monkey' causing trouble. Pretending to be docile, Sun Wukong coaxed the Yellow Robe Monster into bringing out a golden pill, claiming it could aid his cultivation. Sun Wukong seized the chance to trick the pill into his mouth and escaped from the cave.
The Yellow Robe Monster discovered the golden pill was stolen, realized he had been tricked, and flew into an uncontrollable rage. He flew out of the cave and encountered Sun Wukong again. The two fought once more. Unable to defeat Wukong, the Yellow Robe Monster revealed his true form: the celestial star official, Kui Wood Wolf. He let out a wolf howl and spewed demonic fire from his mouth. Sun Wukong wrestled with him, gradually gaining the upper hand. In the midst of the fight, the Great White Planet descended on an auspicious cloud and shouted, 'Kui Wood Wolf, you fiend! Surrender at once!' It turned out the Jade Emperor had sent him down to capture him. Seeing the heavenly deity, Kui Wood Wolf dared not fight any longer and could only submit to his crime.
After Kui Wood Wolf was taken away by the Heavenly Deity, the demonic aura around Tang Sanzang dissipated, and he gradually regained his human form. He opened his eyes and found himself already inside the Kingdom of Baoxiang. Overjoyed to see Tang Sanzang recovered, the king hastily held a banquet in his honor and thanked Sun Wukong for the grace of defeating the demon.