In the reign of Jiajing during the Ming dynasty, Prime Minister Yan Song and his son, Yan Shifan, abuse their power. They frame Yi Hongqi’s father and have him executed. To avenge his father’s death, Hongqitravels to the capital for the imperial examination. He finds himself compelled to stay at the Peach Blossom Temple due to lack of money. Fortunately, Hongqi’s friend Qiu Xigang gives him some money for survival.
Hongqi pays a visit to the Yan house and is invited to stay in the west chamber. Yan Shifan orders a servant to kill Hongqi at midnight. Though separated by the east wall, Shifan’s daughter Yuying and Hongqiexchange poems and they fall in love.
Informed of Shifan’s murderous plan by a servant, Yuying helps Hongqi escape. Officers are sent to searchYan’s house and confiscate his property, and a maid, Qiubo, volunteers to be a slave in Qiu’s house to take the place of Yuying. Yuying makes a living by selling her poems. Xigang helps Yuying and falls in love with her. He takes Yuying back to his own house. After winning the first place in the highest imperial examination, Hongqi learns that Yuying is in Qiu’s house. He writes a letter to Qiu, asking to marry Yuying.Qiubo has been adopted by Xigang’s father, and, not daring to reveal her true identity, she pretends to consent to the marriage. On the wedding day, Hongqi finds to his bewilderment that the bride is Qiubo. That night, Yuying meets Hongqi in the garden and the two embrace each other in joy. Xigang mistakesHongqi’s act as an attempt to steal his lover, but finally the Qiubo-Yuying switch is revealed to all and the story ends happily.