Li Yao, a modern logistics manager, transmigrates to the stable of the Weibo garrison in the late Tang dynasty, where he starts out as a lowly stable hand who could be beaten to death by the soldiers at any moment. Drawing on his management skills and knack for arithmetic, he rises by managing the horse feed. He helps the junior officer Zhang Guiba get military supplies in order, saves the young son of the military governor during a mutiny in Weibo, and is taken on as a personal attendant. From then on, he uses his growing influence to assemble a "team of accounting advisers," wielding control of the supply routes as a weapon. He first seizes a county, then takes control of a prefecture, maneuvering carefully between powerful warlords like Zhu Wen, Li Keyong, and Li Maozhen.
The biggest twist: he discovers that his transmigration was no accident. A reclusive chancellor from the late Tang dynasty chose him as part of a grand design based on a "fragmentary scroll of heavenly secrets." The chancellor intends to use him to carry out a century-old plan: "curb the warlords, equalize the land, and restore imperial authority." And this chancellor is the mentor Li Yao trusts most. Once he sees the truth that he was being used as a chess piece, Li Yao turns the tables and takes over the resources behind the plan. In the end, with three policies, "abolish the fiefs and establish counties, equalize the land and reduce taxes, and rebuild the fubing militia system," he wins the people's hearts, defeats his rivals, and ascends the throne as emperor. But he leaves behind a warning in the "fragmentary scroll of heavenly secrets": institutions are more reliable than people.