Necropotence's last ability creates a delayed triggered ability that will put the exiled card into your hand. That ability still triggers even if Necropotence is removed from the battlefield before your end step.

Artwork
Loading artwork…
Necropotence
Iconic Masters · #98 · EN
Nonfoil—Foil—
Card rules
Skip your draw step.
Whenever you discard a card, exile that card from your graveyard.
Pay 1 life: Exile the top card of your library face down. Put that card into your hand at the beginning of your next end step.
Mythic · Illustrated by Dave Kendall
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Oathbreaker Legal
PreDH Legal
Alchemy Not Legal
Future Not Legal
Historic Banned
Legacy Banned
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
Premodern Banned
Standard Not Legal
Standard Brawl Not Legal
Timeless Restricted
Tlr Banned
Vintage Restricted
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If a discarded card isn't put into your graveyard (due to an effect such as that of Obstinate Baloth) or leaves your graveyard (perhaps because another effect returned it to your hand), it won't be exiled.
If you discard a card with madness and wish to cast it, Necropotence's ability won't exile that card. If you don't wish to cast it, you choose whether it ends up exiled or in your graveyard.
You can't look at the cards exiled by the last ability while they're face down.