Li Yi traveled to the Tang Dynasty and was outside the city of Chang'an. He used historical knowledge to sneak into the city and met Cheng Yaojin by chance. Cheng Yaojin recommended him to Li Shimin because of his cleverness.
Li Shimin appreciated Li Yi's novel insights and profound knowledge, and kept him in the palace. Li Yi used modern knowledge to make suggestions and solve many problems, such as improving agricultural irrigation technology and proposing new business strategies, and gradually gained Li Shimin's trust. In the palace, Li Yi received the care of Empress Changsun, but he clashed with Li Tai. Li Tai was jealous of his important position and secretly framed him.
Li Yi relied on his wisdom and the help of others to resolve the crisis, and also discovered Li Tai's conspiracy to seize the throne. He teamed up with Cheng Yaojin and other loyal ministers to help Li Shimin see through the conspiracy and stabilize the government.
Li Yi's influence grew, and he participated in major historical events such as the conquest of the Turks and diplomacy, and contributed to the prosperity and stability of the Tang Dynasty. He also gained love with a famous lady, and finally became famous in the Tang Dynasty and became a legend.