Remove the guards somehow from the equation. Have them focus on henchmen or somehow get taken out early.
Level the mini-boss down from impossibly high to just pretty hard.
The point of the game is for everyone to have fun, not teach lessons about the vagaries of sandbox style play.
Here is a 3rd option:
Turn it into a non-combat situation.
What does the bad guy want? Does he realize that, since he can't leave, he is screwed? Why not bargain for his life?
Being a "miniboss" I assume he's got lots of information to give to the PCs. Have him trade his life for information like this. Maybe he has things he can teach the PCs - new rituals in 4E, or a prestige class, or whatever.
This might actually be better for the PCs. If they are able to get valuable information from him, they'll get more than they would just from killing him.
Anyways, while he's talking with the PCs, have him try to corrupt them over time. If you're playing 4E this could be a good place to use a skill challenge, but that requires a certain style of play.
I would say, have the guard fight the boss, and lose.
The lesson to the players then becomes: "I the GM will void your actions if they don't fit my plans".
The players learned that the miniboss was too tough for them, and sought out allies to deal with it. That's smart play. Nerfing the miniboss or turning the royal guard into human rabble or whatever in order to create a balanced encounter is NOT FUN. It's not fun because the players by their actions have already indicated what they find fun: getting an advantage through cleverness that enables them to beat a superior foe.
If the *mini* boss wipes the floor with the Royal Guard, the King's best warriors, in a battle of their choosing, stop and think for a moment what message that sends the players. It reduces the RG to the level of cardboard cut-outs, like the Die Hard 2 SWAT team, only there to make the PCs look good. 99% of players will appreciate it far more if the Royal Guard are depicted as just as tough & competent as they ought logically to be. Then when the PCs eventually surpass them in power, it becomes a genuine achievement.