I can think of a few vaguely similar situations, actually.
Near the end of Final Fantasy X, the characters decisively reject the quest they had been on, and end up using “forbidden” technology to permanently destroy the evil sea monster instead of merely winning a ten-year respite.
The second big twist in Ender’s Game also is a bit like this, when the surviving aliens finally figure out how to communicate with humans...
The only fantasy book I’ve read where something similar happened is King Rat by China Miéville, and it doesn’t hit it on your head quite so hard. :P
I can think of a few vaguely similar situations, actually.
Near the end of Final Fantasy X, the characters decisively reject the quest they had been on, and end up using “forbidden” technology to permanently destroy the evil sea monster instead of merely winning a ten-year respite.
The second big twist in Ender’s Game also is a bit like this, when the surviving aliens finally figure out how to communicate with humans...
Absolution Gap by Alastair Reynolds also had a “quest finally judged a bad idea and abandoned after years of work and sacrifice” ending.