The problem you have is that you don't want to break player agency, but you do want to continue running a fun adventure. I have some experience with this problem myself.
The solution I've found that works is to tell the player that I don't think he's a good match for my table, and ask him to leave the game. I did this twice; both times we played out the rest of the adventure and the other players thanked my afterwards.
Here is another thing which I've considered doing, but haven't tried yet: let him succeed and then invoke Parallel Worlds to keep the game going.
"Victory! It took a great struggle, but you've ignored all the warnings, slain all the guardians, and unbound all the seals. The Apocalypse is loosed upon the world!
(It kills you first, of course.)
We can imagine an observer, high above the planet, looking down at the horror you've unleashed. There's no visible blast wave, no explosion. There's just a circle in which the land has turned grey. There's no light, no life, no color, no movement; everything is dead. The circle expands to engulf the whole planet.
Congratulations! You've ended the world!
So here's the next question: how are we going to keep playing the game?
Well, as you know, there's not just one Earth -- there are a vast number of parallel Earths.
There's an Earth where magic doesn't exist; there's an Earth where you guys are all wizards. There's an Earth where you're all ponies. And, in particular, there's an Earth which is just like our current game, except that Bob's character never existed, so he's never destroyed the planet.
And we're going to continue our adventure by focusing on that Earth.
Thanks for playing with us, Bob!
Now. What are the rest of you doing?