The film tells the mythological origins of Nezha, who is a protection deity in Chinese folk religion, and its story is loosely based on the literary version of the myth that forms two chapters of Investiture of the Gods, a Ming-dynasty shenmo novel, traditionally attributed to Xu Zhonglin, which incorporates various existing myths into a wider narrative.