What isn’t surprising is the end of this story (since it’s in the title) but the means of which it came about. Captain Marvel isn’t taken out by a massive, world shaking events or a malicious dick of an antagonist but by something grounded and real; cancer.
Captain Marvel (or Mar-Vell, more accurately) is actually a member of the Kree race who arrived on Earth as a spy. He's eventually considered to be a traitor by the Kree for being way too heroic and becomes one of the world's most lovable/ripped group of friends; the Avengers.
As aforementioned it's not a traditional superhero death that claims Mar-Vell; not entirely, that is. Whilst fighting Nitro, an enemy who can blow himself up and then reform himself (which is kind of messed up, really), Mar-Vell was exposed to nerve gas. All seemed to be well but it was later revealed that that nerve gas kicked off carcinogenesis.
After going from medical geniuses to renowned sorcerers it became clear to Mar-Vell that his time had come. He even accepted it with grace, telling Lady Death that she didn't need to put on any illusions to soften the blow (the illusion in question was her actually having a face).
Originally considered to be one of those heroes that actually stayed dead, Captain Marvel has come back and died off a few times, such as during the Chaos War event. The veil between life and death weakened so Captain Marvel took this chance to come back to life.