During an archaeological excavation, Lin Yuan accidentally transmigrates to the Tang dynasty on the eve of the An Lushan Rebellion. Drawing on his modern knowledge and background in history, he tries to change the course of events, only to find himself caught in a political maelstrom. While fleeing, he meets Li Wan'er, the daughter of a noble family, and together they fight An Lushan's rebel forces. After enduring one hardship after another, Lin Yuan gradually realizes that history cannot be reversed. In the end, he chooses another way to influence the times, and grows as a person along the way.