Yes, it does.
Damage caused by entry hazards (such as Spikes) and recoil and crash damage (except from Struggle) is prevented. Magic Guard will also prevent Life Orb's HP deduction without negating its power boost. Damage from confusion still occurs. -Quoted from Bulpapedia
Source