Kui Mulang is one of the Twenty-Eight Mansions in Journey to the West. After leaving Heaven, he appears in the mortal world as the Yellow Robe Demon. These are two identities of the same character, not separate beings.
Star Official and Demon
Kui Mulang’s heavenly office and his years as the Yellow Robe Demon belong to one continuous life. When Heaven recalls him, the outlawed star official returns to his former station.
Baoxiang Kingdom
As the Yellow Robe Demon, he lives at Boyue Cave and holds Princess Baihuaxiu. The resulting conflict draws Tang Seng, Zhu Bajie, Sha Wujing, and eventually Sun Wukong into the Baoxiang Kingdom episode.
Battle and Return
He fights the pilgrims in demon form and uses transformation against Tang Seng. When the heavenly register reveals his absence, the story identifies him as Kui Mulang and brings him back under celestial authority.

