A Pokemon with Magic Guard cannot take any form of indirect damage. This includes damage from Hail, Sandstorm, Spikes, Stealth Rock, poison, burn, Leech Seed, Nightmare, Bad Dreams or recoil from Jaboca Berry, Rowap Berry, Life Orb and recoil attacks (Brave Bird, Double-Edge, Flare Blitz, Head Smash, Submission, Take Down, Volt Tackle and Wood Hammer). However, it will still take damage from Struggle recoil, confusion and Perish Song.
A Pokémon with Magic Guard will still take damage from being Poisoned outside of battle as normal.
Pokémon With Magic Guard
Related ThreadsMagic Guard Abra - last post by @ Nov 13, 2013
Magic Guard After Transfer from 3rd Gen.? - last post by @ Sep 29, 2007
Question about Magic Guard. - last post by @ Jul 26, 2007