Nicholas Hoult is finally getting his chance to enter the Harry Potter universe.

The actor has been officially cast as Gilderoy Lockhart in Season 2 of HBO's upcoming Harry Potter television series. The role is particularly interesting because Hoult previously auditioned for the original Harry Potter movies but never managed to land a part in the franchise.

Now, more than two decades later, he is returning to the wizarding world in one of Hogwarts' most memorable roles.

Nicholas Hoult Will Play Gilderoy Lockhart

Hoult will portray Gilderoy Lockhart, the charismatic but highly self-important Defence Against the Dark Arts professor who becomes a major character in Harry Potter and the Chamber of Secrets.

The character was previously played by Kenneth Branagh in the 2002 movie adaptation.

Lockhart is known for his enormous confidence, celebrity status and tendency to take credit for achievements that may not actually belong to him.

The character's arrival will therefore give the second season a very different personality as Harry, Ron and Hermione move into their second year at Hogwarts.

Hoult Has a Long History With Harry Potter

Perhaps the most surprising part of the casting is Hoult's own history with the franchise.

Before becoming an established actor, Hoult auditioned for Harry Potter during the casting process for the original films.

He also auditioned for the role of Draco Malfoy, but neither opportunity resulted in a part.

Hoult has previously spoken about those early auditions, including his attempts to convince the filmmakers that he could play Harry.

More than 20 years later, the actor has finally landed a role in the franchise—just not the character he originally auditioned for.

Season 2 Will Adapt The Chamber of Secrets

HBO's Harry Potter series is designed to adapt one of J.K. Rowling's seven books across each season.

The second season will therefore be based on Harry Potter and the Chamber of Secrets.

That story takes Harry and his friends back to Hogwarts for another year, where a mysterious threat begins targeting students.

Lockhart becomes part of the story as the new Defence Against the Dark Arts teacher, bringing plenty of confidence and self-promotion to the classroom.

From Lex Luthor to Gilderoy Lockhart

Hoult's casting is also notable because the actor has recently become associated with another major franchise role.

He plays Lex Luthor in the DC universe's Superman.

Moving from one major franchise to another, Hoult will now take on a very different type of character as the flamboyant and self-obsessed Lockhart.

The casting gives the actor an opportunity to play a character that is considerably more comedic and eccentric than some of his recent roles.

The New Harry Potter Series Is Still Building Its Cast

The HBO series already has a major cast assembled for its first season.

Dominic McLaughlin plays Harry Potter, while Arabella Stanton plays Hermione Granger and Alastair Stout plays Ron Weasley. The adult cast includes John Lithgow as Albus Dumbledore, Janet McTeer as Minerva McGonagall and Nick Frost as Rubeus Hagrid.

The first season will adapt Harry Potter and the Philosopher's Stone.

HBO has already renewed the show for a second season, which will move into The Chamber of Secrets.

The first season is scheduled to premiere on December 25, 2026, while Season 2 is expected to follow later.

Hoult's Harry Potter Casting Comes Full Circle

For Nicholas Hoult, the Lockhart casting is an unusual full-circle moment.

As a child actor, he tried to get into the original Harry Potter movies, auditioning for major roles but ultimately missing out.

Now, years later, he has finally received his invitation to Hogwarts.

Only this time, he won't be playing Harry Potter or Draco Malfoy.

He'll be the man teaching them Defence Against the Dark Arts—and one of the most hilariously overconfident professors Hogwarts has ever seen.