Lin An, a graduate student in the history department, died suddenly while writing a thesis all night. He traveled through time and became the son-in-law of the Su family of the Great Xia Dynasty. At the beginning, he was framed by the housekeeper for stealing the master's jade pendant, and he fell into a dead end. At a critical moment, he activated the historical error correction system, used the system's scanning function to find the hidden jade pendant, and killed the housekeeper who framed him. He also accidentally discovered evidence that the housekeeper emptied the Su family and colluded with Wei Jin, the head of the Ministry of Internal Affairs. Relying on the business insight given by the system, Lin An used temple fair marketing to defeat the Su family's rival Zhao Buxing in the three-day bet, and became famous. Recruited by the third prince Li Xuan, he joined forces to fight against the powerful Wei Jin, exposed his conspiracy to embezzle the treasury and collaborate with the enemy and treason, beheaded Wei Jin in front of the palace gate, and was named a supervisory censor by the emperor. Just after the internal troubles were resolved, the crisis of dynasty collapse ensued, with millions of barbarian troops from the north marching south. Lin An once again relied on the system to embark on the road to rewrite the fate of the country in Great Xia.