If damage that can’t be prevented (such as the damage Malignus deals) is dealt to Gloom Surgeon, you’ll still exile cards from your library.

Artwork
Loading artwork…
Gloom Surgeon
Avacyn Restored · #104 · EN
Nonfoil—Foil—
Card rules
If combat damage would be dealt to this creature, prevent that damage and exile that many cards from the top of your library.
2/1
He roams the streets of Havengul seeking the sick and delirious so that he may cure them of their lives.
Rare · Illustrated by Volkan Baǵa
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Combat damage that would be dealt to Gloom Surgeon will be prevented even if you can’t exile that many cards from the top of your library.