Yu Fengsheng, a scholar, adores a courtesan called Hua Yanhong. One day, he puts on his best clothes and pays a visit to her and the two fall in love with each other instantly. He promises to marry her after he has passed the imperial examination. Later they say goodbye at a riverside. He gives her a round fan made of gold as a keepsake, and the two vows to spend the rest of their lives together.
Fengsheng’s parents died when he was young, so he was brought up by his father's concubine, Sijie. Now that he comes first in the imperial examination, as a devoted son and a loyal subject, he requests the emperor to honour Sijie with an appropriate title. Returning home in glory, he is told off by his mother and his sister Mingyue, both of whom have heard stories about his relationship with a courtesan. Sijie hasMingyue forge a letter and return the keepsake to break off the engagement. Yanhong is so grieved by the thought that Fengsheng has betrayed her that she decides to become a nun.
Seeing how lovesick Fengsheng is, Sijie and Mingyue go to a nunnery to pray for him. There they catch sight of a poem written on the wall. Admiring the poet for her talent, Sijie wants to match Fengsheng and the poet together and asks the emperor for permission. It turns out that the poet is none other than Yanhongand Fengsheng is overjoyed. The story resolves in the marriage of the lovers.