During the Xuanhe era of the Northern Song, Zhang Mingxuan, a modern history doctoral student, unexpectedly transmigrates into the body of a poor scholar. Armed with his knowledge of history and modern thinking, he starts out in the imperial examinations and weathers political infighting, foreign invasions, and factional strife. He eventually becomes the chancellor who reforms the Song, striving to change the course of civilization amid the tides of history.