Magnetic Mine will not trigger when it is put into a graveyard from the battlefield itself, although it will trigger if another artifact is put into the graveyard from the battlefield at the same time.

Artwork
Loading artwork…
Magnetic Mine
Mirrodin Besieged · #113 · EN
Nonfoil—Foil—
Card rules
Whenever another artifact is put into a graveyard from the battlefield, this artifact deals 2 damage to that artifact's controller.
Rare · Illustrated by David Rapoza
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
PreDH 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
Premodern 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