What's so wrong about being a murder hobo in the comment section?
I say, I know that the king actually did things to protect his own people, even if out of the wrong reasons. But those things include summoning people with really dangerous abilities. So if somebody comes with realism in such an scenario, let's see how things would realistically play out: Turning against a summoned hero with extreme high abilities is in itself a dangerous thing to do. And removing the government head figures doesn't automatically mean turning against the population at all.
The war of succession thing: The heros are not at fault, if the people start to turn against each other and kill each other in a war of succession. The people, that kill, do the killing in the end. The people, who disturb the food production and distribution, do those things, because they can't agree on a successor. Heck, those poor civilians might even have lived through all of this or even worse, if the heros wouldn't have saved them and the demon army would have had their way with them.
Though it is likely there is already a successor in the waiting or every time a king dies there would be a bloody civil war raging. It's a given, that that person might be close to the former king, but then again a murder hobo from an alien world just ripped the old kings head off, so....I believe the successor would be open to a friendly discussion on how to threat other people nicely. You know, because we are real here. There is also the option for the heros to simply replace the king themselves. Now that would create a revolt, but is the fault for that really on the heros themselves alone?
If the heros survived the ordeal against the demon army, they must have defeated them. Why shouldn't a good portion of the people side with the people, who just saved their butts? The heros just have to tell them, that the king tried to murder them and enough people (given not everyone has been onto that secret) would be okay with them. And as the heros already proved to be murder hobos, let them kill anyone who turns against them (with the exception of civilians) in the name to save the civilians. The heros can also chose to rule them by fear. That is also a valid option. The king did the very same thing to a certain extent. People throwing wrenches into your government clockwork everywhere? Lol! Replace them and execute them for high treason against ... the people. There are enough people to take their positions. Enough to rat those people out in first place. Why did the previous king's rule work to start with?
They can also leave the kingdom be, after killing the government heads that is, and leave them to themselves. If they have a grudge against the heros for helping them and other people making their lives miserable and send assassins after them, they can simply return and rip the next kings head off. Rinse and repeat until the kingdom gets the message. "Don't summon demons from another world!"
In the end they wouldn't make things worse. They already made things better by fending off the demon army. And removing a head of the state, that doesn't really care about the lives of others, might also be a blessing. With all the knowledge from Earth chances are thing get even better. Those arguments I just sprouted might have been shortsighted and "things might not be as simple as they appear", but many things are simpler than some people want others to know. And some solutions to complex affairs are pretty easy, when it comes down to it. If you try to handle things in a direct approach with enough force, you force other people to act to get things right again and arrange themselves with the new situation. That is a kingdom ruled by a single king. Killing him will solve a lot of problems. And if other people create new problems, e.g. nobles, well there is also a solution for that.