it was the queen all along. she had a maid poison his drinks. i think he had been drinking small amounts of poison ever since tia's grandfather warned him to be cautious of what he consumes (foreshadow early on in the series). perez gave him the "herbal tea" right before the assembly, but it was actually an antidote. it was a very elaborate scheme, but the queen dug her own grave by using a very rare, specific poison. the same kind that was used on perez when he was shot with a poisoned arrow. remember the purple letter perez got from the queen's cousin? she was the queen's supplier & the letter proves that. perez used that info against the queen & she meets her demise after confessing to everything. ironically, both perez & the queen wanted the king dead for their own goals. however, perez was 5 steps ahead of her by postponing the king's death, getting rid of the queen & his half sibling, & earning the king's trust for "saving" him. he managed to convince/manipulate the king into appointing him as the next king. & well, let's say the king didn't die of natural causes after perez reached his goals lmao. it's been a while since i read the novel but this is the gist of it.

spoilers for our stupid ahh king
.
.
.
.
.
.
.
he doesn’t die here, but he IS bedridden and very weak. he literally couldn’t handle being king. perez becomes crown prince and he threatens the king while he’s sick lmao so kim and tia can get engaged again. head of lombardi cannot become empress but perez deadass changes the law to make it happen with the king’s decree. let’s think of the king as perez’s pawn from now on