Wen Ruxue, the illegitimate daughter of the Vice Minister of Works, is branded a "cursed loner" by her stepmother, Lady Zhao, from the moment she is born. Only the sacrifice of her birth mother, Concubine Li, allows her to survive in the Cold Plum Courtyard. When Wen Ruxue is six, Lady Zhao falsely accuses Concubine Li of theft, leading to her death in disgrace. Wen Ruxue is abandoned at a country estate outside the city, with only her mother's wooden hairpin for company.
After ten years of hard labor, Wen Ruxue grows into a resilient and clever young woman. One day, while gathering firewood, she rescues a gravely wounded man named "Liu Zhe" and nurses him back to health. He leaves her a jade pendant in gratitude and promises to repay her someday. In truth, he is Prince Sheng, Zhu Sheng, who was ambushed by political enemies.
Half a year later, Wen Ruxue is forced to return to the capital and enter the palace as a maid in her elder sister Wen Ruxi's bridal retinue, where she is repeatedly harassed. In the depths of the palace, she reunites with Zhu Sheng, now Prince Sheng. He secretly helps her avert an attempt to poison her and gives her medicine for her injuries. Unwilling to be a pawn, Wen Ruxue relies on Zhu Sheng's help to seek a post as a palace official. Her Suzhou embroidery, "Plum Blossoms Defying the Snow," wins the empress's favor, and she succeeds in taking charge of the Palace Attendants Bureau.
As a palace official, Wen Ruxue uses her authority to investigate the injustice done to her mother and finds evidence of the false accusation in the Cold Plum Courtyard. Zhu Sheng devotes himself to clearing Concubine Li's name and, beneath the moonlight, pledges his love to Wen Ruxue with the jade pendant. Together, they thwart Wen Ruxi's repeated schemes and eventually have her stripped of her title and confined to the Cold Palace.
Despite opposition from all sides, Zhu Sheng petitions the emperor to grant their marriage. Wen Ruxue transforms from an illegitimate daughter into a princess consort. After their wedding, the two work together to investigate corruption in their fief and purge treacherous officials from the court. Zhu Sheng rises to become regent, and Wen Ruxue becomes his capable partner. From their first meeting at the country estate to their life together in the palace, from the wooden hairpin that held her mother's memory to the jade pendant that carried their love, they face fate with resilience and help one another flourish through their devotion, finally finding happiness in a peaceful and prosperous age.