Xiao Wanzi (played by Zhang Ting) sneaks into the Hong Kong Convention and Exhibition Centre in an attempt to steal a cultural relic called the "Dream-Wandering Immortal Pillow," but is caught in the act by Hong Kong policewoman Zhang Chuchu (played by Liu Lili). During their struggle, a once-in-a-century astronomical spectacle occurs—thirteen planets align in a straight line at midnight—and in that very instant, the two vanish into thin air. When they awaken again, Xiao Wanzi finds herself in the imperial palace of the Ming Dynasty several hundred years in the past, while Zhang Chuchu has also traveled back to the Ming Dynasty but lands among the common folk. These two modern women who blunder into the Ming palace each encounter a royal descendant: Zhu Yunwen (played by Xu Zheng) and Zhu Di (played by Wan Hongjie). Beneath the surface of palace power struggles, undercurrents run deep—though Zhu Yunwen is Zhu Yuanzhang's favorite grandson, the ambitious Zhu Di has long coveted the throne. Xiao Wanzi and Chuchu are quite familiar with this period of history. What impact can they have on it? And how will their romances end?