While studying at home for a history exam, senior high school student Zheng Shaopeng is accidentally knocked out by a thick history book. When he wakes up, he finds himself in Danzhu, a state recorded in the history book, and becomes a poor scholar named Yang Lin. At first, he couldn't adapt to the ancient life, but he becomes popular among the villagers due to his inventions using modern knowledge, and gradually feels a sense of belonging. In an era of turbulence both internally and externally, Yang Lin witnesses the chaos of war and the sufferings of people. By virtue of his wisdom and competence, Yang Lin wins a place in the imperial government, and helps leading the state to get rid of superstitions, crack down on corruption internally, fight against strong enemies externally, and become strong and technologically advanced.