Burn It to the Ground and Salt the Earth.
Last night I was talking with an old friend and we got to speaking about his campaign that he's been running for the last year or so. Now my friend was convinced that he'd worked himself into a corner as a Dungeon Master and was seeking my advice to remedy his situation.
"The problem isn't that I don't have a story - I've got two hundred modules and a notebook full of ideas - it's that I can't challenge them. I let them use all of the books and they've min/maxed me to the point where I have to throw a damned Tarrasque at them to make it worth while and I'm half afraid they'd kill it."
I get calls like this every so often and the Dungeon Masters involved in these sorts of predicaments from my area and they usually want me to do either one of two things: come in and kill all their players for them; or give them a way to do it that doesn't smell like limestone. In this particular situation he already had the dynamite in hand but wanted to avoid coming across as a flustered prick incapable of dealing with his players ambitions and avarice.
So we sat about talking out the complexities involved in robbing your players of their magical gear without them feeling like you're cheating them of something they've earned. He came up with contrived situations that smelled like traps from half way across the state and followed that by meandering his way through magical items that were given to their opponents that were far more powerful only to add at the end, "But they'll probably kill them and then I'll be in even worse shape."
Well, then it's time to burn it all down and salt the earth behind you.
"What do you mean?"
There are times when you're still having fun as a Dungeon Master that it's not only okay for your players to get the best of you, but preferable. This isn't one of them. They've pushed your game to the point where you're not having fun so it's time to push back and make it fun again for you, because I guarantee they're not having fun either. To do that we're going to strip everything away from them, piece by piece, and they're going to know what's happening. We'll start on the periphery with NPCs they know.
Who's their favorite? Who do they like to talk to the most?
"That'd be Maggie St. John, she's a retired pirate who runs this little bar in -"
We're killing her and hanging her body on the front of the bar. Take it as far as you're comfortable with but over her head needs to be the words, 'Your Sins Are Remembered.'
Because that's the first step. After that we'll work our way through each of their contacts with variations on that message being scrawled above their dead bodies.
"Okay. I can do that."
Good, because the next thing is going to make you uncomfortable. Whenever the players next leave their home base you're going to plunder their treasure horde. And after they get back and have their bitch fit, you're going to rob them in their sleep of their favorite magical gear.
"I don't know, that's going to piss them off."
That's the point. You want them mad and you're going to give them a target. Find someone they've wronged in the past. The long lost sister of a villain they killed and pissed on back when they were first level works, but you'll have someone they've wronged who wants revenge by this point. Either way you start dropping clues that this person is out there and that they're the one gunning for the players.
Make the journey to her something special - lots of traps and a forgotten temple somewhere out in the wilds is just mundane enough to keep them from realizing how far you're going but still special enough to feel different since you don't use them. Let them think they have the upper hand, and just before they kill her, have her start a self destruct sequence. They'll want to run and you have to let them run, it's better even if they gate home, because home's about to be wiped off the map as she's just finished a magical ritual to bring in a mad god with an axe to grind against their city.
"Fuck. I can use this."
Don't pull your punches, because you only have one shot at pulling this off.