Yan Tongshu is a modern forensic pathologist who dies from overwork and transmigrates into the body of a fourteen-year-old top scholar in the ancient dynasty of Wu. The original host was a woman who had been cross-dressing as a man for eight years after her family lied about giving birth to a son to save her father's life. Yan Tongshu, content with a life of leisure, accepts a low-ranking position at Xianlin Hall, a book restoration office that serves as a political exile point. She spends her days eating, napping, and reading picture books, having learned to survive court politics by feigning extreme uprightness and frequently impeaching officials to avoid attention.
The story begins on the morning of a family meeting where Madam Yan hopes to finalize a marriage contract between Yan Tongshu's younger sister, Yan Liangyu, and Zhou Zhengxun, a man from the Zhou family who had previously abandoned the engagement when the Yan family lost status. Yan Tongshu, indifferent to family affairs, leaves Xianlin Hall to investigate a case that catches her attention: a woman named Yang Dama is kneeling at the Kaifeng Prefecture gates, crying injustice for her son Zhao Sheng, who has been convicted of murdering his grandfather, Zhao Gengtian.
Yan Tongshu visits the prison to interrogate Zhao Sheng, who claims he is innocent and that his grandfather died after accidentally hitting his head on a cabinet during an argument. Yan Tongshu examines the corpse at Shenming Pavilion and discovers inconsistencies: the bruises on Zhao Gengtian's body are painted with elm tree sap, not real injuries, and the head wound is not fatal. She deduces that Zhao Gengtian was fabricating a beating to extort the Yang family's noodle sauce recipe. Further investigation reveals that Zhao Gengtian suffered from a serious illness causing vision loss, headaches, and convulsions, likely a brain tumor or aneurysm. Yan Tongshu presents her findings in court, overturning the conviction and proving that Zhao Gengtian died from a natural medical event, not murder.
Meanwhile, the new emperor, Qin Yi, ascends the throne and seeks to reform the corrupt bureaucracy. His advisor, Chang Zhengzhang, recommends Yan Tongshu for the position of Acting Prefect of Kaifeng Prefecture, citing her investigative skills and integrity. Yan Tongshu is transferred from Xianlin Hall to Kaifeng Prefecture, where she begins handling criminal cases. The narrative shifts to introduce a second storyline involving Yao Yuejin, a food blogger who transmigrates into the body of a married woman with a paralyzed husband, Pei Fengzhi, and a six-year-old son. Yao Yuejin takes control of the family restaurant and forces her husband to work, unaware that he is actually the missing Crown Prince. The two share a toxic relationship bound by a poison that requires them to be together every seven nights. When Pei Fengzhi discovers Yao Yuejin's identity, he captures her and locks her in a golden cage, though he cannot bring himself to kill her due to the poison's effects.