If you could journey to any fantasy world, which would it be? I, like many millions of others, would have to choose JRR Tolkien's Middle Earth – although, given the option, I'd divide my time between Gondor and Rivendell, and skip the guided tours of Moria and Mordor. Lev Grossman, author of The Magicians and its sequel, The Magician King, might well choose that other classic of British fantasy literature, the Narnia of CS Lewis. But without doubt, the Milllenials out there who grew up with the works of JK Rowling are at this moment gleefully shouting: HOGWARTS! HOGWARTS! HOGWARTS!

For Quentin Coldwater, protagonist of Grossman's stupendous urban fantasy novels, the choice is Fillory, a fictional world within the fantasy of The Magicians. Fictional, that is, until Quentin discovers that the beloved Fillory and Further novels of his youth are factual accounts of a real magical realm. Not that the Brooklyn-born teenager, geek and academic overachiever is greatly surprised by the discovery, having by this point already graduated from Brakebills, a secret Ivy League college of magic, as a master of the mystical arts.

I am far from the first to call The Magicians and The Magician King Harry Potter for grown-ups. Deconstructing the Potter mythos is so clearly part of Lev Grossman's intent that it is hard not to make the obvious, but also inaccurate, comparison. In fact, it would be fairer to say that The Magicians is a book for the generation who grew up loving Harry Potter, but are experiencing the crushing disappointment of outgrowing their fantasies. The Magician King is Harry Potter for grown-ups ... who have learned to hate Harry Potter.

In Grossman's novels, magic isn't so much the key to ultimate power as it is a response to existential ennui and disillusionment. Quentin and his wealthy, magical friends typify a generational response to the core conundrum of the Millennial generation. The Baby Boomers tried to topple the system with the counterculture. Generation X exploited their slacker chic to drop out of the system. The Millennials have decided that, if there is a system, they are going to play it, and they are going to win. For Quentin, magic is just another system to be learned in order to get what he wants from life.

Every generation gets the fantasy it deserves. Victorians had the stark realities of life and death depicted in George McDonald's At The Back of the North Wind. The interwar generation could escape to Neverland, but the cost of not growing up was always clear in the work of JM Barrie. The Baby Boomers would inherit the world, just as CS Lewis promised in the works of Narnia. Thank God Thatcher's children could rely on Roald Dahl to show them the truth of a world dominated by the selfish, callous and cruel.

In Harry Potter, the Millennial generation has a fantasy that reflects its own obsessions. Harry's problem is not so much that he is an orphan; rather, his real predicament is being trapped in a stifling lower-middle-class upbringing. Imagine if Harry hadn't been lucky enough to have powerful friends to help him get to private school and a top-class education. Instead of becoming the world's most powerful wizard, he'd have had to settle for a place at the local comp and, if he was lucky, a job in a call centre or, very lucky, as an estate agent. What if Harry had been left behind on Platform 9 and 3/4 at Kings Cross? Forsaken to live a (possibly longer) mundane life, with only a dull sense of existential despair to keep him company as Hermione and Ron continued on to magic and adventure?

That's the scenario that Lev Grossman explores in The Magician King, through the character of Julia Quinn, who instead of taking up her rightful role as the Hermione Granger of the story, is instead abandoned to live a prosaic life after narrowly failing her entrance exam to Brakebills. Julia's memories are wiped, but she is certain on the deepest level of her subconscious that magic is real; that she has the potential to be a magician and have a life beyond the humdrum reality she was born in to. The story of Julia's dramatic psychological collapse, the abandonment of her perfect academic career, her alienation from her family, and her willingness to do anything, even prostitute herself, to regain what she lost, somewhat steals the show in The Magician King.

Julia Quinn eventually finds her magic on the mean streets of modern America, learning a wild and improvised but powerful form of the polished sorcery taught at Brakebills. Lev Grossman twists from her story a clever metaphor for the core conundrum of the Millennial generation. We've been brought up to believe we can all be Harry Potters of a kind: that with the right education we can be artists or scientists, actors, writers, researchers, academics, politicians, business leaders, thinkers, intellectuals and celebrities. But for most the reality is much more mundane, just as it was for our parents and grandparents. And like generations before, many of us will learn to accept that reality. Lev Grossman's fantasy novels are about the ones who keep fighting to find their own magic. To judge by their growing success, that's more of us than ever before.