Young lawyer Lin Yu refuses to defend unscrupulous companies because he stands by justice, and his career in the modern world hits a dead end. After an accident, he transmigrates into Su Yichen, an impoverished scholar in the Song Dynasty.
Newly arrived in the Song Dynasty, Su Yichen witnesses an injustice: a wealthy local man bribes officials to seize a commoner’s land. Drawing on his modern legal knowledge, Su Yichen steps in and wins justice for the commoners, making a name for himself and meeting Zhao Lingshuang, the daughter of an official. He then studies Song law diligently. With Zhao Lingshuang at his side, he combines modern logical reasoning with Song law to help the authorities solve one difficult case after another, becoming a celebrated legal advocate. But as his fame grows, he offends the powerful by exposing a high-ranking official’s corruption. He faces relentless persecution and is falsely accused of plotting a rebellion and thrown into prison.
In jail, Su Yichen draws on his iron will and knowledge of the law to search for evidence that will clear his name, while Zhao Lingshuang and others work tirelessly to rescue him from outside. In the end, Zhao Lingshuang finds crucial evidence and helps vindicate him. Just then, an unexpected turn of events gives Su Yichen the chance to return to the modern world. After all he has endured, he struggles to choose between his longing for modern life and all the ties he has formed in the Song Dynasty. In the end, he chooses Zhao Lingshuang and the Song Dynasty, joining hands with her to keep fighting for justice under the law and fairness in society.