Cai Bojie was born into a poor family in Chenliu. Scarcely two months into his marriage to Zhao Wuniang, Cai's father orders him to take the imperial examination at the capital. Seeing that his beloved daughterHuilan has grown up, Prime Minister Niu Sengru intends to betroth her to Cai, who has won first place in the imperial examination. Although Cai declines the offer, the minister retains him while using a trusted subordinate to lie to Cai that his family has met with calamity, with all members dispersed, in the hope that he might fall in love with Huilan.
A severe drought sets in on Chenliu, and though she spins day and night, Zhao fails to make ends meet and eventually has to sell her shock of hair to give her parents-in-law a decent burial. After that, she disguises herself as a Taoist nun and travels to the capital in search of her husband, singing and playing the pipa to earn a living. One day, passing Motuo Temple, Zhao hangs the portraits of her parents-in-law from a branch to beg for alms. Cai also goes to the same temple every day to pray for his parents; his searching wife catches a glimpse of him from behind by chance. Suspecting the person she sees to be her husband, Zhao pursues but is stopped by his guards.
When the emperor summons Cai to the imperial palace to offer him marriage into the royalty, Cai would rather become a monk than comply. Zhao finally manages to meet her husband, but she leaves in indignation because she thinks he has betrayed her trust. He overtakes her to explain, and the two make up. With misunderstandings sorted out, against all odds, the couple is reunited.