Throughout the series, Lord Sangheon operates as the puppet master behind the throne. When King Hyejong tries to break free, Lord Sangheon poisons him with a rare herbal toxin. Dam-yi ascends the throne as King to protect her court and investigate her father's murder.
In the final episodes, Lord Sangheon discovers that King Lee Hwi is actually the female twin Dam-yi and launches a bloody coup. Realizing military force cannot stop him without endless bloodshed, Dam-yi invites Lord Sangheon to a private tea session with tea laced with the same lethal poison. Dam-yi calmly drinks first to reassure him; Lord Sangheon drinks as well and dies on the floor.
Dam-yi hovers near death but is saved by Ji-woon's medical expertise. Prince Lee Hyun ascends the throne as the new King, declares that 'Crown Prince Lee Hwi' died in the rebellion, and expunges all royal records of her male persona. Dam-yi is granted full legal pardon, restored to her true identity as a commoner woman, and lives a quiet life by the sea with Ji-woon.