If you discard a card but that card is not in your graveyard as Bag of Holding's first ability resolves, that card remains wherever it has moved.

Artwork
Loading artwork…
Bag of Holding
Jumpstart 2022 · #756 · EN
Nonfoil—Foil—
Card rules
Whenever you discard a card, exile that card from your graveyard.
2,
: Draw a card, then discard a card.
4,
, Sacrifice this artifact: Return all cards exiled with this artifact to their owner's hand.
There's no prepared like overprepared.
Rare · Illustrated by Dmitry Burmak
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
You both draw and discard while Bag of Holding's second ability is resolving. No player may take any action—nor can anything else happen—until you've both drawn and discarded.
If Bag of Holding is moved to exile when you sacrifice it (most likely due to Leyline of the Void's effect), it remains in exile. It won't be returned to your hand.
If you control more than one Bag of Holding, you choose which one will hold the discarded card. Other Bags of Holding can't return that card.
If Bag of Holding leaves the battlefield, the items it contained are exiled forever (and, perhaps, scattered throughout the Astral Plane). If the same Bag of Holding card returns to the battlefield, it's considered a new object without access to the cards stored by the old object.