Shen Qingci, a concubine-born daughter of the Shen family in Jiangnan, loses her mother at a young age and suffers under the cruelty of her stepmother. In secret, she studies mathematics and medicine, biding her time and building her strength. Her legitimate elder sister, Shen Jinrou, who is the principal wife of the Gu household, lures her into the family to help deal with Liu Miaoyin, a concubine. Shen Qingci is meant to be a pawn, but her beauty and cleverness astonish everyone. Gu Yanzhi, the Minister of Revenue, falls in love with her at first sight. His initial protectiveness deepens into a fierce devotion, turning him into a husband who dotes on his wife. She exposes accounting discrepancies, sees through a fake pregnancy and an attempted poisoning, outmaneuvers the principal wife, the concubine, and her stepmother, and uncovers the truth about her mother's murder, completing her revenge. She also uses her mathematical expertise to help Gu Yanzhi resolve a crisis at court. In the end, she breaks free of the constraints imposed on a concubine-born daughter and is granted the title of Madam Minister by imperial decree. Together with Gu Yanzhi, she protects their children and secures the family, rising from someone everyone could bully to the most powerful woman in the household.