Modern policewoman Shen Changning fell from a building and died in the line of duty while chasing a fugitive. Her soul passed through the Ming Dynasty and became the legitimate daughter of the Shen family who had been tortured for ten years. The concubine's sister ran away from marriage, and her aunt's mother forced her to marry the unpopular seventh prince Zhu Qiyu. On their wedding night, the two made a three-part agreement: not to interfere with each other, but to each get what they need.
But Shen Changning has a secret - every night when she goes to sleep, she dreams of fragments of the future. With this power of prediction, she solves murder cases in the palace, opens an incense shop to make money, avoids palace banquets and murders, and steps into the court's sight from an abandoned concubine in the cold palace. The seventh prince went from treating each other coldly to leaving a bowl of hot soup for her late at night, and the two gradually fell in love.
When Japanese pirates invaded the country, Zhu Qiyu went south to supervise the army. Shen Changning stayed alone in the capital, dealing with the concubines in the harem, the eunuchs in charge of rituals, and the powerful officials of the strict party. He used his precognitive dreams to gradually unravel the situation of the three princes forcing the palace. In the dark night of the palace, she stood in front of the Queen Mother's palace with a sword, covered in blood, and did not take a step back. At dawn, all the officials bowed their heads.
On the southern battlefield, Zhu Qiyu relied on the "military situation prediction" in her secret letter to win consecutive battles. The couple reunited and joined forces by sea and land to encircle the Japanese pirates completely. He ascended the throne as emperor, and she was granted the title of queen to assist the government. Her ability to predict has evolved from fragmentary dreams to insight into general trends, helping her husband implement the New Deal, improve coastal defense, and create a prosperous age.
Many years later, on an autumn night, the couple stood side by side at the highest point of the palace city, overlooking the lights of thousands of houses. Shen Changning leaned on his shoulder and said, "When I got married in a sedan chair at the age of twenty, I thought this would be it for the rest of my life." Zhu Qiyu held her hand and said, "I also thought that this would be it for the rest of my life." Under the moonlight, the two looked at each other and smiled. A prosperous life begins from the day of the substitute marriage.