In ancient times, King Yu completed his great work of flood control and hid a Map of Mountains and Seas inside the Temple of King Yu in the Immortal Realm. Two hundred years later, the map vanished, plunging the Immortal Realm into chaos. The eight guards assigned to the temple's outermost perimeter, each with only the feeblest magic, received a divine revelation from King Yu. They were ordered to immediately transmigrate through the Primordial Gate to Huainan, find the child prodigy capable of resolving the Immortal Realm's crisis, and bring him back to the Immortal Realm sixteen years later to solve the mystery of the map's disappearance. The eight little immortals transmigrated back to Beishan in Huainan. By observing the heavens, they discovered that a child prodigy was about to be born in the Prince of Huainan's residence. Unexpectedly, Liu Chang, the Prince of Huainan, brutally slaughtered the family of Jing Chou, daughter of the former rebel king Ying Bu. As a result, Jing Chou's vengeful spirit could not pass on and entered Liu An's body. Prince Liu Chang constantly steered his son toward revenge, while the Eight Strange Immortals taught Liu An all kinds of magic and showed him how to conduct himself. Liu An developed a dual nature. When Liu Chang was accused of rebellion, his whole family was arrested and sent to Chang'an. The Eight Strange Immortals could only watch helplessly as Liu An was taken away.
Liu Chang was found guilty and exiled to Shu Commandery. He took his own life on the way. Although Emperor Wen of Han executed the county magistrates along the route, Liu An and the others were placed under house arrest. Four years later, Emperor Wen enfeoffed Liu An and his two brothers as marquises. Liu An used public pressure to force Emperor Wen to restore his title as Prince of Huainan.
After returning to Huainan, Liu An wanted to make a great difference, but the chancellor and commandant of Huainan blocked him. The Eight Strange Immortals tried to use their magic to drive out Liu An's inner demon, but discovered that it had already grown so powerful that removing it would endanger Liu An's life. They had no choice but to give up. One of the Eight Strange Immortals stayed behind disguised as Liu An, while the other seven took Liu An to the Primordial World. A wild girl followed them in, and the nine of them began their journey to restore order to the Primordial World.