The story mainly tells of the early death of the heir of Duke Dingguo. To stabilize military power and ensure that the Han family army of the northern frontier would not be affected by court politics, the Duke of Dingguo's eldest daughter, Han Yuanniang, takes the place of her twin brother, Han Shiyi, and becomes the heir of the Duke of Dingguo's household. Han Shiyi cultivates a public image of being a frivolous, lustful, and good-for-nothing playboy, yet unexpectedly becomes the study companion of the Fifth Prince, Chen Yanyi. After being "forced to take sides" with the Fifth Prince's faction, Han Shiyi helps the Fifth Prince devise strategies to seize the position of crown prince. Amid this series of turbulent events, the Fifth Prince and Wang Zhongyu, the son of Chancellor Wang, discover Han Shiyi's female identity and secretly develop feelings for her. During this period, a series of hilarious stories unfold.