Situ Jin, a mischievous free-thinking lady, and her companion, A Ling, go on a series of adventures. She does not know that she is a princess of the former royal family. To protect her family�s reputation outside the home, Situ Jin dresses as a man and calls herself Xiao Longxia. Concerned about the plight of the refugees which the officials have been ignoring, she comes up with various schemes to help them.
Emperor Zhu Yun has been steadily working on consolidating the empire that his father had left him. A monk once gave him a puzzle, telling him that whoever solves it will help him with the problems of the empire. He escapes from his palace to wander around the city with his companion. He befriends Xiao Longxia after he realizes that the money she has conned and stolen from others is being spent on the refugees. When Xiao Longxia solves the puzzle, he decides to maintain closer ties with her.
The prince of Yunnan resents the emperor since his sister, the previous queen, had been killed with her family. He sends his son, Bai Yu Fei, to cause unrest and to marry Princess An Ning.
An unlikely friendship develops between the Emperor, Xiao Longxia and Bai Yu Fei, each pretending to the others to be someone else. Palace and court intrigues, rebellion and assasination plots abound.