A talented poor man, Zhang Hao, educates children on a farm of a wealthy peasant whose name sounds the same as his, although it is spelled a little differently. There Zhang is found by a friend, a dignitary Fan Zhong-yan. He convinces him to seek happiness in the capital and gives him three letters of recommendation - to a merchant in Luoyang, to an official in Huangzhou, and to Sun, the mayor of Yangzhou, asking him to help Zhang. He does not believe in success — everywhere lies, honest people in the pen — however he leaves.
Before Zhang Hao arrived in Luoyang, the merchant to whom he was heading suddenly dies. Accompanied by the curses of the widow, Zhang moves on.
Fan showed the emperor Zhang's composition and secured a position for him. By similarity of names, the envoy takes Zhang as a peasant from the farm, and he goes to the place of service. Meanwhile, Zhang Hao, before reaching Huangzhou, learns from the monk about the death of the second alleged benefactor. He tears the third letter so as not to bring unhappiness to the addressee, and goes back. On the way, it begins to rain. He takes refuge in the Temple of the Dragon, where the deity itself is resting. Zhang wonders about his fate the answer is disappointing. In anger, he writes lines disrespectful to the Dragon on the wall of the temple. He threatens to take revenge.Continuing his journey, Zhang confronts his peasant surname. The peasant persuades the guard to kill a dangerous witness for him. Zhang Hao tells the guard his story and thus saves his life. The peasant also wants to get rid of the guard; The mayor, who has arrived in time, takes both of them and carries them to the capital.
Worried by the lack of news from a friend, Fan Zhong-yang begins to search for Zhang Hao. And Zhang lives in the Jianfu monastery, whose abbot is ready to help him get to the capital. He promises to take a thousand prints from the stele, the inscription on which belongs to the famous calligrapher Yan Zhen-qing, so that Zhang would sell them along the way. On the same night, the Dragon commits revenge - smashes the stela with a thunderclap. In desperation, Zhang Hao wants to commit suicide, but Fan Zhong-yan, who once again appeared in place, holds him back. They go to the capital.
Zhang Hao receives the highest degree. Fan hosts a feast in his honor. Mayor Song appears. The vile peasant receives retribution, an honest guard - the post of ruler of the county. Finally, Zhang Hao marries his daughter Dong.