When the Yellow Robe Monster saw Sun Wukong's immense power, he conjured a demonic wind, stirring up sand and rocks to blind Wukong, and took the chance to flee back into his cave. Sun Wukong returned to Baoxiang Kingdom and informed them of the monster's abilities. Zhu Bajie refused to accept this and said: 'Elder brother, don't boast! Let me, Old Pig, go and confront him!' Wukong laughed, saying: 'You blockhead, don't try to show off.' Bajie ignored him and went with Sha Wujing to the Crescent Moon Cave. The Yellow Robe Monster lured Bajie into the mountains, spewed poison smoke, captured him, and hung him inside the cave. Sha Wujing could not withstand him and fled back to Baoxiang Kingdom.
When Sun Wukong saw Sha Wujing return alone, he knew Bajie had been captured, which enraged him further, so he decided to use a clever trick. He transformed into the likeness of Princess Baihuaxiu and sneaked into the Crescent Moon Cave. The Yellow Robe Monster suspected nothing and instead complained about the 'Horse-Keeper' causing trouble. Sun Wukong pretended to be docile and coaxed the Yellow Robe Monster into bringing out the Golden Elixir, claiming it could aid his cultivation. Sun Wukong seized the opportunity to trick the elixir into his mouth and escaped from the cave.
When the Yellow Robe Monster discovered the Golden Elixir was stolen, he realized he had been tricked and was furious beyond measure. He flew out of the cave and once again encountered Sun Wukong. The two fought again; the Yellow Robe Monster could not prevail, so he revealed his true form — the celestial star official, Kui Mulang. He let out a wolf howl and spewed demonic fire from his mouth. Sun Wukong wrestled with him, gradually gaining the upper hand. While they were fighting, the Great White Planet descended on a cloud and shouted: 'Kui Mulang, you wretched beast, why don't you surrender!' It turned out that the Jade Emperor had sent him down to apprehend Kui Mulang. When Kui Mulang saw the celestial deity, he dared not fight further and could only submit to punishment.
After Kui Mulang was taken away by the celestial deity, the demonic aura on Tang Sanzang dissipated, and he gradually regained human form. He opened his eyes and found himself in Baoxiang Kingdom. The king, overjoyed to see Tang Sanzang recovered, quickly prepared a banquet to entertain him and thanked Sun Wukong for his kindness in vanquishing the demon.