Poor scholar Ai, who makes a living by selling paintings, is particularly partial to the idol Jiutian Xuannü of the ninth heaven. At the Dragon Boat Festival, Ai encounters Leng, a young lady who has come to the Shrine of Xuannü to pay her respects to the goddess. The two strangers find that they both live in Guizhili, and that their houses are separated only by a river. The two falls in love, and through exchanging poems, pour out their hearts to each other.
With great difficulty, Ai persuades Leng’s mother to consent to their marriage. Unexpectedly, Prince Min, who has long been fond of Leng, decides to take her as his concubine and has his soldiers capture her.Leng tries in vain to make the prince change his mind. The prince asks the lovers to bid farewell to each other by separating them with fire. Without hesitation, the two jump into the flames. Then they turn into a pair of mandarin ducks and vanish mid-air.
In truth, Leng is the goddess Jiutian Xuannü and Ai is an immortal named Fengyue Xianzi. After the goddess ascends to heaven, Ai remains in love with her, though he is separated from his body. He searches for the goddess in heaven and on earth. Finally, Ai finds Leng on Mount Huayang and wins back her heart. Even the God of Fire is moved by the immortals’ pleas and agrees to their marriage. They live happily together thereafter.