Meng Lijun is so celebrated for her talents that two families of distinction have proposed marriage to her. A contest between the suitors is arranged to determine who will have Ligun as his wife. Liu Kuibi loses the archery competition by one arrow's count to Shaohua. Begrudging Shaohua his victory,Kuibi’s father Jiesurrounds Shaohua’s home, but Shaohua escapes. The Lius then try to force Lijun and Kuibi to marry. Unwilling to comply, Lijun hasYingxue take her place.
On the wedding night, Yingxue assaults Kuibi and tries to drown herself in a lake. Yingxue is then rescued by the prime minister, who adopts her as his daughter. Disguising herself as a man with the pseudonym Li Junyu, Lijun leaves home. The talented woman takes the metropolitan civil service examination in the capital and comes out first on the list. Recognizing her achievement, the prime minister ties the knot between his adopted daughter and the woman in disguise. Later, having come out, again, first in the highest civil service exam, Lijun is appointed prime minister and assigned to be in charge of the military service exam. Shaohua takes the exam and comes out first.
Appointed to the position of general, Shaohua leads his troops to the frontier and returns triumphant. WithLijun’s help, Shaohua reveals his grievances to the emperor, who then clears his family’s name. The emperor charges the elder Liu with enemy collaboration and sends him to prison. Catching Lijun when she takes off her hairpin and puts on a man's hat, the emperor confines her to Tianxiang House and tries to extort the truth from her. Admiring her beauty and talent, the emperor wants to make Lijun his concubine, but he has to relinquish his ambition when the empress dowager adopts Lijun as a god-daughter. Lijun is acquitted and allowed to marry Shaohua.