I did a machine translation of a wiki on this novel. I think the emperor falls in love with her after he sees Lok Heun dressed as a woman (for a mission or something).
The translation gets super shaky, so take this with a huge grain of salt
At some point, the emperor thinks that Lok Heun died while giving child birth, but the body actually belongs to someone else.