Yes it will take damage and to add information regarding the badly poisoned status:
If a Magic Guard Pokemon is under the effects of Toxic poison, their Toxic counter still increases normally, even though they aren't taking damage. This means that if the Pokemon loses Magic Guard, the Toxic damage it receives is the same as it would be getting on that turn if it hadn't had Magic Guard.
Meaning, the damage of toxic poison increases even though you are not taking any damage from it because of magic guard so if you lose your magic guard a few turns after being inflicted by toxic, you will be taking much damage from the poison.
source - http://www.smogon.com/dp/abilities/magic_guard