Harry Potter's magic disappeared before the end of his final book, according to fantasy novelist Lev Grossman, and it's all because of happy endings. Spoilers ahead for those who still haven't read the Deathly Hallows!
Grossman explained his disappointment in JK Rowling's choice of future for her boy hero to Newsarama.com:
I loved Harry Potter, but that epilogue was such an astounding failure of imagination on Rowling's part! And in a way, it throws the entirety of all seven novels into doubt retroactively.
I felt the problem she failed to solve was the question of, "here's a young man who can do magic, who has defeated the enemy of humanity when her was 18 – what's the rest of his life look like?" And the best she can imagine is that he marries his high school sweetheart and puts on a big gut and lives in the suburbs. What a disaster!
He went on to say,
There has to be some better fate for Harry Potter than what he gets. I think that's something of the message of [Grossman's new book] The Magicians – you're not going to go to Narnia, but there has to be something better than that bourgeois suburban mediocrity that seems like the only alternative.
Somewhere, a million Potter fans are sharpening their knives in preparation for revenge.
The MAGIC of Lev Grossman [Newsarama.com]