Zhu Yingtai aspires to study under a famous master of Hangzhou. With her father’s consent, she leaves home disguised herself as a man. On their way, she and her maid encounter Shanbo and his loyal squire. They become the best of friends during their three years of study. Long suspicious of her gender, the squire wonders about Yingtai’s true feelings toward Shanbo. Yingtai has indeed fallen in love with his master, but is too shy to reveal herself.
A letter from home urges Yingtai’s return, and Shanbo comes to see her off. Along the way, Yingtairepeatedly hints at her true gender, but Shanbo is not aware of her attempts. Finally, instead of telling the truth, Yingtai fabricates a lie about a younger sister whom Shanbo should come to see. Unfortunately, back at home, Yingtai’s father has accepted an offer from a favorable suitor for her, and Shanbo arrives too late to stop the marriage. He falls ill from sorrow and dies.
When her wedding procession passes his tomb, Yingtai gets off the sedan chair and offers sacrifices to him, expressing her wish to turn into a butterfly and stay with her lover. A sudden bolt of lightning opens the tomb into which Yingtai dives. People there witness a pair of butterflies fluttering happily away.