While visiting the Forbidden City, Ji Xiaotang accidentally transmigrates to Qing Dynasty China in the forty-fifth year of the Kangxi Emperor's reign, becoming a candidate for the imperial selection. Forced into palace intrigue, she must quickly adapt to the rules of life in ancient times.
Using her modern medical knowledge, Xiaotang treats the sick candidate Su Wan'er, earning her trust and becoming her ally. She also attracts the attention of Fourth Prince Yinzhen.
Xiaotang's modern words and behavior earn her the enmity of Noble Consort Nian, who frames her. Yinzhen secretly helps her escape danger, and the two begin to fall for each other.
Xiaotang is assigned to Consort De's palace, where she is drawn into even more complicated palace intrigues. She discovers the conflict between Consort De and Noble Consort Nian, and realizes that the Eighth Prince's faction is keeping her under surveillance.
Xiaotang's feelings for Yinzhen deepen amid the dangers, but she must carefully conceal her modern identity and true feelings while facing threats from all sides.