Shen Zhiwei, an orphan from a poor family, whose parents died young, relies on her astounding arithmetic skills to survive. In order to make a living, she tied up her hair and disguised herself as a man, and was admitted to the Imperial College. However, she was repeatedly ostracized because of her humble background. It happened that Xiao Heng, the young emperor of Dajing, was inspecting the accounts incognito. When he encountered chaos in the treasury accounts, the civil servants of the dynasty were at a loss what to do. Only Shen Zhiwei found out the tricks at a glance and found the loopholes in the accounts with precise planning. The emperor cherished his talent and moved him into the household department. From then on, this "little official" from a poor family used arithmetic as a blade and data as a shield to move from the accounting room of the household department to the center of the court. Checking taxes, investigating corruption, surveying rivers, and raising military pay, she defeated the powerful officials in the court with her hard power, and supported the Dajing treasury with her true talents and knowledge; Xiao Heng also acted as an emperor, always protecting her from wind and rain, from secretly supporting to blatantly supporting her. When her daughter's identity was revealed, the court was in an uproar and the powerful ministers revolted, but Xiao Heng said loudly: "Shen Qing's merits are worth the crime of deceiving the emperor, and my court is only for the good!" In the end, Shen Zhiwei became the first female prime minister of Dajing, and worked hand in hand with Xiao Heng to eradicate the traitors, clean up the officials, and stabilize the world.