As the last ability resolves, the enchanted creature is put into its owner's library. After it resolves, Shattered Ego is put into the graveyard from the battlefield.

Artwork
Loading artwork…
Shattered Ego
Modern Horizons 2 · #62 · EN
Nonfoil—Foil—
Card rules
Enchant creature
Enchanted creature gets -3/-0.
3
: Put enchanted creature into its owner's library third from the top.
"You can't even fathom the depths of your own insignificance." —Geyadrone Dihada
Common · Illustrated by Chris Cold
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander 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
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
If the enchanted creature's owner has two or fewer cards in their library, the enchanted creature is put on the bottom of their library as the last ability resolves.
The creature will be put into its owner's library even if Shattered Ego is no longer attached to it as the ability resolves.