In the Tiansheng Dynasty, under the appearance of prosperity, the imperial power and the aristocratic families are constantly in dispute, and the field of medicine is the key to the competition between all parties. Su Miaoyin was the eldest daughter of Duke Dingguo in her previous life. However, due to the early death of her mother, she was persecuted by her stepmother Liu and her concubine Su Ruoxue. She was designed to marry a sick and weak official. She died unjustly after being tortured.
In a desperate situation, she was unexpectedly reborn back to the age of hairpins. In this life, relying on her past life memories and modern medical knowledge, she is determined to take revenge. At the family banquet, Su Ruoxue caused mischief, and she amazed everyone with her talent and wisdom; she studied medicine in the Valley of the Divine Doctors, and she distinguished herself by integrating ancient and modern medical skills.
The fifth prince, Jamel Xiao, is talented but has a hard time on the road to becoming the heir because of his mother's humble background. After getting acquainted with Su Miaoyin, the two worked hand in hand. Su Ruoxue colluded with the second prince Xiao Jinghuan in an attempt to gain the power and wealth of the Dingguo Palace, and framed Su Miaoyin and Xiao Jingxuan many times.
As the investigation deepens, Su Miaoyin uncovers the truth about being framed in her previous life. In the thrilling court struggle, she and Jamel Xiao join forces to expose the enemy's crimes to the public. In the end, Jamel Xiao ascended the throne as emperor, and Su Miaoyin became queen. They devoted themselves to the development of medicine, established medical clinics, cultivated talents, and contributed to the prosperity of the dynasty and the well-being of the people. The two worked together to write a legendary story.