During the Xuanhe period of the Northern Song Dynasty, Zhang Mingxuan, a doctoral student in the Department of Modern History, accidentally traveled through time and became a scholar from a poor family. Relying on his foresight of history and modern thinking, he started from the imperial examination, experienced official strife, invasion by foreign enemies, and internal party strife, and finally became the prime minister of the reform of the Song Dynasty, trying to reverse the trajectory of civilization in the historical torrent.