Heaven and Earth gave birth to a Chaos Pearl of great power, and the resulting demon immediately began to rage. The heavenly lord subdued the creature, divided the pearl into two - the Spirit Pearl and the Demon Pearl - and imprisoned them both in a lotus flower. He also instructed the immortal Taiyi to see to it that the Spirit Pearl would be reborn into the third son of the ruler Li Ziying, who should be named Nezha, while he imposed a fate on the Demon Pearl - in three years it would be destroyed by a lightning strike.
But another immortal named Yang Wei steals the Spirit Pearl just before the birth of the heir, and the demon becomes possessed by the child. Once born, Necja starts throwing fireballs at the population, wreaking havoc, terror and destruction, so Taiyi puts a golden restraining collar on him. The ruler Li Jing asks to keep the baby alive and swears that he will not allow him to leave the palace, because in three years' time Naeja will be cursed with a deadly curse.