Your players have finally confronted a boss in your campaign and one of two things happen: The battle is over so fast that the party wonders why he seemed like such a threat at all. Or, you as the DM pull punches to try and keep the party from being wiped out. Now don’t get me wrong, you might be playing in a group that wants everything to live and die by the dice, and that’s cool. But if you want more feel from the big boss fights in your adventures, this might be a way to accomplish that.
Imagine that you have a orc war-chief that your party is facing. And you want the fight to really sap the party’s resources and push them hard, but you don’t want them to die fighting this opponent. A way to think about this is to give the war-chief a small number of hit points that might normally go down in one or two hits from your players, but only players who are bloodied (at or under half their hit points) can actually damage this boss. This has the potential to really drain the party. Especially if they have potions and healing spells. This orc war-chief could seem all but invincible if the party is working hard to stay at max health. You could even go further by having the war-chief not have any hit points, but instead, only required to be hit 3 times by any bloodied player to be vanquished.
At this point, we’ve made the fight last till we want, but we’ve also possibly just made it worse. If the orc war-chief, for example, can one-shot some of the player characters, this isn’t going to be a fun fight as they each get mowed down. Imagine how you want the war-chief to feel to those he is fighting. In this case, let’s assume we want a plodding, slow, feel to the war-chief that makes the characters feel like they need to keep moving to avoid getting hit. Let’s mark the war-chief a large creature and give his great-axe attacks a reach of at least two. Each turn, the war-chief can only attack with his axe once, but we’re going to treat this more like a spell than a melee attack. The war-chief can target any square within two squares of himself and make an attack, but he can only target where an enemy was at the end of his last turn. The attack should be devastating (1/2 their hit points at least) for anyone who tries to stand toe-to-toe with the war-chief, but if a player has kept moving, they should be safe. And if you really want them to keep moving, you might give the great-axe attack secondary damage to anyone within two squares of it that does half damage (1/4 the target’s hit points at least) and forces a con check to prevent being knocked prone.
The war-chief needs some more extra abilities to really add some character, but the meat of the boss fight tells us a good story about what kind of enemy this is, it’s beatable, but will come at a cost to the characters. I would consider adding a war-chief shout that can cause fear or something similar. Perhaps even having the chief be able to start with a bow that behaves much like the great-axe, but have him drop it (and switch to the axe) once a player is threatening his space. Maybe even give him a charge or similar attack that bowls the players over if they stick together.
I hope that conveys the idea of a boss that serves your narrative more than a designed enemy that follows the mechanics.