If Barishi isn't in your graveyard by the time the ability resolves, you still shuffle all creature cards from your graveyard into your library.

Artwork
Loading artwork…
Barishi
Weatherlight · #119 · EN
Nonfoil—Foil—
Card rules
When this creature dies, exile it, then shuffle all creature cards from your graveyard into your library.
4/3
Uncommon · Illustrated by Ted Naifeh
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
PreDH Legal
Premodern Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
The player who controlled Barishi when it left the battlefield is the player who controls the ability. It doesn't matter whose graveyard Barishi is put into.