Hmm, this is a tricky one because 'Give a Heart to the Emperor' isn't a single, universally known novel. I think the confusion comes from a mix-up or a very specific webnovel title. There's a popular manhwa called 'The Emperor's Heart' and tons of similar-sounding Chinese webnovels with 'Emperor' in the title. If we're talking about a common plot in this trope, it's usually about a transmigrated or reincarnated female lead who has to somehow 'win' or 'heal' the cold, tyrannical emperor's heart, often through schemes, palace politics, or uncovering a past life connection.
My guess is the specific story you're asking about might involve the heroine being forced to sacrifice something literal, like her own physical heart or her emotions, to save the emperor from a curse. That's a recurring setup. Without the exact author or platform, it's hard to pin down, but the core is always the emotional and political gamble of trying to soften a ruler who's built walls around himself.