They're up against a wall. There's nowhere to run and no other choice. So, a character gives up their humanity to become a monster capable of saving them.
1). Adventure Time:
The "Great Mushroom War" has destroyed human civilization. The radiation turns the (unprotected) survivors into zombie-like "oozers." Simon Petrikov is an antiquarian protected by a magic crown. Its potent magic slowly warps his body and erodes his mind with each use.
In the aftermath, he discovered Marceline. A young, half-human child. As the only two immune to the radiation, they became family. When they're cornered by a pack of oozers, Simon is forced to wear the crown to save Marceline. Furthering his transformation into an insane, inhuman ice wizard.
2). Sweet Home:
Civilization falls apart after people start turning into violent monsters. Each monster reflects a warped version of their human progenitor's greatest desire. For example, someone who wants to get in shape might turn into a hulking mass of muscle. The protagonist, Hyun-su, starts turning into a monster. But because the depressed man has no desire to act upon, he is trapped halfway through the transformation.
He is helping evacuate his apartment building's survivors. At the last minute, a monster appears on the roof. At this point in his story, he has finally developed a desire of his own: to save his friends from the apocalypse. He morphs into a monstrous, knight-like creature. And defeats the attacking monster.
3). 30 Days of Night:
A group of vampires invade a far-north Alaskan town during the arctic winter. To save the town and buy time for the sun to return, the protagonist willingly becomes a vampire. He holds the others off long enough for the townspeople to escape. But dies once the sun returns.
4). One Piece:
Kuma willingly allows himself to be converted into a cybernetic weapon. In order to get treatment for his dying daughter.
5). Black Clover:
A devil manipulates the human nobles of the Clover Kingdom to massacre the elves. Licht, the leader of the elves and holder of an insanely rare "four-leaf grimoire," realizes this is the work of a devil. To keep the devil from stealing his grimoire and attacking innocent people with it, Licht commits the ultimate act of forbidden magic. He absorbs huge amounts of corrupt energy from the underworld, and is transformed into a rampaging demon. His friend, the first wizard king, stops Licht before he can level the country. His grimoire is lost, and his wife and unborn child survive.
6). Pantheon:
At this point in the story, humans are trying to wipe out "uploaded intelligences" that are living in the internet. An evil UI creates a biological weapon to attack humanity. Unable to stop him indirectly, the protagonist uploads his mind. Destroying his physical brain in the process. As a digital ghost himself, Caspian is able to stop the evil UI and prevent him from unleashing a viral plague.
7). Young Justice:
Zatara offers himself up to the immortal lord of order, Nabu, so that his daughter does not become the next Doctor Fate. Nabu agrees, and Zatara spends the next decade as the powerless host of the immortal spirit.
8). Ben 10: Ultimate Alien
Kevil Leven willingly mutates himself into a chimeric alien monster to stop the villain, Aggregor.