Heroic sacrifice?
"Greater love has no one than this: to lay down one’s life for one’s friends."
— John 15:13
A character saves another/others from harm and is killed, crippled, or maimed as a result.
There are essentially three kinds of Heroic Sacrifice:
The one at the beginning of the story, which sets the tone for the rest of the tale.
The one in the middle of the story, wherein the Heroic Sacrifice leads to new heights of Bad ***, or new depths of depression, in the characters who are affected by it (depending on the story.) Sometimes both.
The one at the end of the story which serves as a Grand Finale, an example of "This character is Too Cool to Live", or the kernel of a Downer Ending or Bittersweet Ending. The "Too Cool to Live" Heroic Sacrifice is the most common type in American movies. Often, The Hero Dies in a heroic sacrifice at the end.
- TV Tropes
You Shall Not Pass also applies.