Xiwei, the eldest princess of Chen, is seen as foolish until a modern soul transforms her into a genius. Using science and wit, she thwarts the villainous Second Prince, teams up with disgraced scholar Fu Ningyu to stop a rebellion, and later declines the throne to travel the world with him.