I am led to believe that since the Magebane was revealed AFTER he cast the spell that it does NOT damage him.
Magebane is a tricky card to read though, especially for someone who plays other card games where "cast" and "resolve" may work a little differently.
Since Magebane reads when the opponent casts AND resolves a spell, that would lead me to believe that if said spell is countered that it did not resolve, and therefore Magebane does no damage.
My question is...when is a spell cast, and when does it resolve? Is it cast as soon as you lay it on the table, or as soon as you spend the mana?.....does an enchantment "resolve" when it hits the table, or when it is revealed?
These are all questions that affect the outcome of Magebane, and also all situations I have been in at one time or other. In one of my early games, I had a player tell me that he did not suffer damage when he cast his enchantment, but he did when he revealed it (thus meaning it "resolved") while in another game I had a player take the damage as soon as he played the enchantment face down. I told him about the other player, and he said that was wrong. One could also argue that if you cast an enchantment one turn, and reveal it later that Magebane would not trigger because you did not cast AND resolve in the same turn. I don't think that is correct, but I can see how someone could argue that.
Being an MtG player I am convinced that a spell is "cast" as soon as the card is revealed from the hand, and has "resolved" as soon as it officially enters play meaning as soon as that enchantment hits the table face down and is NOT countered, it has resolved.