At the outset of “The Magician’s Land,” Quentin is an exile of both Fillory and Brakebills — the school having kicked him out only a few months after hiring him to teach. As the book opens he is participating in a magical heist (O.K., fine, here’s one comparison for you: It’s “Ocean’s Eleven” with a talking crow thrown in). Initially, the premise feels wobbly; the heist is nebulous and Quentin’s motivation for turning to crime seems contrived. We’re told he wants to get Alice back, to try to make her human again, but the declaration seems just that: declared rather than felt.

Once the narrative moves backward, however, to show what happened during Quentin’s too-short tenure as a Brakebills faculty member, the book finds its sea legs. At Brakebills, Quentin is given an official discipline, repair of small objects, and he finally has “a strong sense of exactly who he was as a magician.” He dedicates himself to discerning an arcane spell he filched from the Neitherlands, a sort of way station between Fillory and Earth, and finds that in the aftermath of his father’s death his spell-casting skills are stronger than ever. Once again magic is a vehicle for Quentin to comprehend and express himself: “Casting the spell was like finally finding the words: There, that’s what I meant, that’s what I’ve been trying to say all along.” For the first time, Quentin can forget Fillory and accept his new life as a teacher: “After all that it turned out that wasn’t his story.”

In the Brakebills flashback we discover too that one of the participants in the heist, Plum, was a student at the school until she was expelled for a prank gone wrong. Her future is now tied to Quentin’s. Plum is a direct descendant of the Chatwin children who first visited Fillory, but she keeps the connection a secret, fearing that her family’s depressive streak reveals a genetic pull toward darkness. (Also, she doesn’t believe Fillory actually exists.) Once again, Grossman has created a complicated and realistic female character whose longings render Quentin’s less interesting by comparison. Or so it seems, until we see the magician mature before our eyes. What could be seen as Quentin’s vaguely psychopathic tendencies in the first book — his inability to love Alice deeply — turns out to be merely the emotional myopia of youth. In “The Magician’s Land,” Quentin learns to face his own fears and flaws, and in the process grows capable of connecting with others. His maturing is facilitated by magic, but it’s no simple trick.

Grossman gracefully balances Quentin and Plum’s quest with scenes of Fillory. The magical universe is facing an apocalyptic demise, and Quentin’s old friends Eliot and Janet are trying their best to find out why and stop it from happening. Along the way, Janet recounts her own history of trauma; like Alice and Julia, she has had to trade her human vulnerability for magical strength. This flashback expands the book thematically; it’s not a diversion but a magnification. What must be given up to gain self-understanding and power? The women in Grossman’s trilogy are the first to see that there is always a sacrifice to be made.

The novel’s thrills increase exponentially when Plum and Quentin stop their criminal antics and get their hands on another big spell. Much to the amusement of onlookers, I gasped numerous times at the plot’s various surprises. Finding out what happens next to the gang of magicians is one of this book’s chief pleasures, and I won’t take that away by divulging too many details. So as not to deprive you of your own gasps, I will say only that Quentin and Plum’s ancient spell connects directly with Eliot and Janet’s fight to save Fillory. It also brings Quentin face to face with the niffin Alice has become. Now he is man enough, and magician enough, to encounter her. The novel’s threads tie together beautifully, and by the end Quentin has earned his magic and held on to his humanity.