The story takes place before Tang Sanzang got his disciples and embarked on the Journey to the West.
A riverside village is terrorized by a mysterious underwater creature. A Taoist priest kills a giant manta ray and insists that it is the demon. Sanzang, a self-proclaimed demon hunter, appears to warn the villagers that the animal is not the true demon. The villagers ignore him and, at the priest’s provocation, string him up. The demon reemerges and kills many of villagers. Sanzang frees himself and, along with the survivors, manages to beach the creature, which turns into a man. Sanzang then opens a book of nursery rhymes and begins singing to the demon. Annoyed, the demon attacks Sanzang. Another demon hunter, Duan, captures and turns the demon into a puppet. Sanzang tells to Duan that his master taught him a more humane approach and to use nursery rhymes to coax goodness out of demons, a tactic Duan scoffs at. Disillusioned, Sanzang meets his master and bemoans his lack of capabilities compared to more aggressive demon-hunters. His master reaffirms his humanist philosophy sends Sanzang off again to find “enlightenment.”
A couple enters an empty restaurant but the chef reveals himself to be a pig demon and kills them. Sanzang comes to the same restaurant, this time apparently filled with people. Sanzang sees through the illusion and recognizes them as reanimated corpses of the victims, as well as the demon’s nine-toothed rake. Duan bursts into the restaurant and destroys all the corpses, and attacks the pig demon. She captures the demon in her magic bag to turn it into a puppet, but it bursts out of the bag and transforms into a huge boar, collapsing the building. Sanzang and Duan retreat. Duan then develops a strong limerence towards Sanzang after being impressed by his selfless ideals. She expresses her feelings, but Sanzang flees, not wishing to deal with romantic love in his quest for nirvana.
Sanzang’s master advises him to tame the Monkey King demon Sun Wukong (trapped by Buddha) to subdue the pig demon. That night, he is captured by a gang that had also subdued Duan. It is later revealed to be a ploy orchestrated by Duan to trick Sanzang into having sex with her. After Sanzang rejects her again, she has him imprisoned. The pig demon reappears and injures Duan but is chased off by a trio of rivaling demon-hunters. Duan views Sanzang’s concern for her injuries as a romantic attraction. After Sanzang refuses her advances again, she destroys his book of nursery rhymes and he leaves.
After days of traveling, Sanzang finally discovers a cave under a lotus garden, where Monkey King was trapped in for 500 years. Monkey King tells Sanzang to use a dancer to bait the demon. Duan appears and volunteers to dance. When the pig demon appears Monkey King easily subdues it, allowing Duan to turn it into a puppet. Duan then gives both the fish and pig puppets to Sanzang and offers her golden ringed weapon as an engagement band, but he rejects her again. She leaves after returning his nursery rhyme book, which she had pieced back together, although at random as she is illiterate.
Monkey King tricks Sanzang into removing the seal on his prison and bursts out of the cave. Sanzang begins to pray to Buddha, and an enraged Monkey King rips the hair from his head. The three demon hunters appear to catch Monkey King but he effortlessly kills them. Duan returns and defends Sanzang, but the Monkey King mortally injures her. Sanzang admits he loves her, and Monkey King proceeds to vaporize her body. Looking at the nursery book again, Sanzang realizes Duan accidentally reassembled the words of his book into those of the Buddha Sutra. Sanzang summons Buddha, who defeats Monkey King with the palm of his hand. Sanzang then places Duan’s golden ring on Monkey King, and it turns into his restrictive headband.
Sanzang tells his master that his suffering due to Duan’s loss has helped him to enlightenment. Sanzang is then instructed to travel on a journey to the west (India) for the Buddhist sutras of Leiyin Temple, and it is shown that the Water Buffalo, Pig Demon, and Monkey King have been tamed and turned into humans named, respectively, Sha Wujing, Zhu Bajie and Sun Wukong. As they hike across the desert, Sanzang looks across the sand and sees an image of Duan.