Gilderoy Lockhart

Gilderoy Lockhart is a prominent villain in J.K. Rowling's Harry Potter and the Chamber of Secrets and its 2002 film adaptation of the same name.

He is a famous author and temporary Defense Against the Dark Arts professor at Hogwarts. He is also a fraud author who only sought fame.

In the movie, he was portrayed by Kenneth Branagh.

History
During his school time in Hogwarts, Lockhart was a brilliant and intelligent Ravenclaw with exceedingly high ambitions, the latter of which almost resulted in him being sorted into Slytherin. He claimed to his peers that, before he left Hogwarts, he would make the Philosopher's Stone. He also said that he planned to captain Britain's Quidditch team to World Cup glory, prior to becoming the U.K.'s most youthful Minister for Magic. He studied for renown and achieved infamy among his peers as well as the Hogwarts staff with various antics. Among said antics were begging the Headmaster to approve for a school newspaper (purely so her could see his own name in print), creating a spell that shot an image of his face into the sky akin to the Dark Mark, sending himself 800 Valentines (resulting in breakfast being cancelled due to the number of owl droppings and feathers in the porridge), and engraving his moniker into the Quidditch pitch; the latter example in particular resulted in him receiving a week's worth of detentions.

Following his graduation, which relieved the staff, Lockhart became a bestselling author. Becoming incredibly proficient in Memory Charms, he tracked down accomplished magic users and would then proceed to trick them into talking about their most remarkable achievements. Then, after erasing their memories, would take the credit for said achievements. He became famous by writing printed works about his "exploits", gaining awards along with invitations for book signings.

Lockhart's erstwhile schoolteachers began came to the conclusion that they judged him incorrectly. Headmaster Albus Dumbledore, on the other hand, was doubtful of Lockhart's accomplishments as he personally knew several of his victims. He had the belief that putting him into a garden-variety school atmosphere would rightfully prove his guilt as a charlatan. With the position as Defense Against the Dark Arts teacher open by June 1992, Dumbledore approached Lockhart and proffered him a line of work at Hogwarts. Lockhart was not intent on taking the job, because his career in writing was going through the ceiling. However, Dumbledore implied that teaching the lionized Harry Potter would greatly increase Lockhart's renown. As a result, he accepted the position. When the Hogwarts staff questioned Dumbledore's decision to hire Lockhart, he only stated that there was a lot to learn from even an inadequate schoolteacher.

Harry Potter and the Chamber of Secrets
By August 1992, Lockhart was officially the Defense Against the Dark Arts teacher of the 1992-1993 school year. He assigned seven of his books as textbooks and announced his new position while visiting Flourish and Blotts. Here, Lockhart first met Harry Potter and eagerly dragged the boy into the spotlight. He proceeded to take numerous pictures with Harry as well as sycophantically provide him with a set of his books. However, Harry gifted said set to Ginny Weasley. This is because the experience embrassed him and he was able to afford his own set.

In his new position, Lockhart had taken over the DADA classroom and office with portraits of himself and copies of his books. He began the school year by issuing a lengthy quiz concerning his books, which only Hermione Granger achieved high marks on. He then unleashed Cornish pixies into the room. However, this caused a pandemonium, resulting in Lockhart fleeing to his office. He also forced Harry, Ron Weasley, and Hermione to tidy up the mess.

Lockhart once more became infamous among Hogwarts personnel via giving them unsolicited advice. Most students viewed him as unskilled as well as obnoxious. However, ignorant Muggle-borns as well as multiple schoolgirls were attracted to the DADA teacher.

Subsequent to the pixie incident, Lockhart spent the rest of the year reading excerpts from his books. He also hounded Harry Potter with acts like poorly healing his broken arm, requesting him to answer his fan mails, among others.

After Ginny Weasley was taken into the Chamber of Secrets, Lockhart planned to leave Hogwarts rather than coming to her aid. When Harry and Ron asked him to help them find her, he confessed his crookery. The duo then forced Lockhart down into the Corridor of Secrets as a test subject to see if they would survive the fall. Once in the Corridor, Lockhart seized Ron's wand and attempted to use a Memory Charm to erase their memories. Nonetheless, due to the wand being broken, the spell backfired rendering him completely amnesiac. He was later taken into St. Mungo's Hospital for Magical Maladies and Injuries, much to the staff and students' happiness.

Some time later, Lockhart penned a final book called Who Am I?. It was either written by him or dictated and ghostwritten by another author.

Harry Potter and the Order of the Phoenix
3 years later, Lockhart was still in St. Mungo's, residing in the Permanent Resident Ward. He had recovered to the point of being able to write letters, though he still had no idea how he had ended up there and was only aware of some things about his past that the hospital's staff told him, like the fact he used to be a famous teacher. Harry, Ron, Hermione, and Ginny met Lockhart at St. Mungo's, while visiting Arthur Weasley, who had been injured by Nagini, and they were shocked to see him, being too focused on the recent events to remember that Lockhart was likely to be there, after his incident. While Ron felt guilty in some way about putting Lockhart in this situation, Harry wasn't, since Lockhart was at fault for erasing his own memories when he was trying to erase theirs.

As confirmed by J.K. Rowling, despite that Lockhart's condition got better a little and that he managed to retain some of his memories, he never fully recovered from the Memory Charm that backfired on him. However, he's fortunately known to be happier that way. Given that, it's likely that Lockhart spend the rest of his days at St. Mungo's, forgetful but felicitous.

Personality
Gilderoy Lockhart was an immoderately vainglorious, self-obsessed, egocentric, and narcissistic self-promoter who claimed to have accomplished multiple heroic deeds. However, in reality, he was nothing but a charlatan who took credit for other wizards and witches' achievements. He even claimed his winning of the Witch Weekly's Most Charming Smile Award five times in a row was more impressive than Harry Potter defeating Lord Voldemort. Lockhart also made claims and suggestions, whether about other's occupations or in times of danger in attempt to make himself look more important and powerful. He rather frequently came up with fictitious concepts in the blink of an eye just to impress his admirers. His attempts to acquire more fame additionally led him to attempt spells without entirely understanding them (e.g. removing Harry's bones instead of mending them, and launching a snake into the air instead of making it vanish). Also, it has been speculated that he invented some non-existent incantations and spell names, like Peskipiksi Pesternomi, the Transmogrifian Torture, and the Homorphus Charm. In fact, a majority of his books contained numberless fabricated details to contribute to his ostensible feats. As part of his conceited nature, Lockhart was immensely proud of his books, and would always make reference to them whenever giving advice based on his so-called experience.

Lockhart's overbearing arrogance and insensitive suggestions rubbed most of his non-fans the wrong way. What's more, his unprofessional behavior earned him the disapproval of the Hogwarts faculty as well as a multiplicity of the students. Overall, Hogwarts viewed Lockhart as a joke. When he left due to memory loss, most if not all of the school was elated to see him go.

In addition, Lockhart seemed completely oblivious to other people's negative reactions to him or completely misinterpreted them. One time, he Ron was admiring his peacock quill when he was actually revolted. He ignored Harry's numerous attempts to contradict his theories of enjoying his company and attention, as well as him begging Lockhart to leave his broken arm alone; also completely failed to notice the rest of the faculty shooting daggers at him. After Hagrid was taken into custody, Lockhart asserted Hogwarts was safe from the monster of Slytherin and that extra security was unnecessary. Though almost immediately proven wrong, he stubbornly refused to retract his earlier claims, and continued to complain about how the extra security was tiring him out.

Despite his own books portraying him as fearless, Gilderoy was shown to be uncourageous when faced with true danger. He attempted to make a quick exit from Hogwarts when the other teachers pressured him into entering the Chamber of Secrets after Ginny Weasley's abduction. Even after the location of the Chamber's entrance was discovered, he was willing to leave Ginny Weasley to die, attempting to modify Harry and Ron's memories to cover himself.

Although Lockhart started out as a clever and very skilled student, being sorted into Ravenclaw house, he had a critical flaw in never trying in his studies (or anything) unless he was the very best of it, having been spoiled by his mother's overly affection and his own vanity. Even in his childhood, he already expected the students and teachers to greet him with admiration and excitement, as he deluded himself into thinking he is a genius above all others of undeserved rights, and was very disappointed and dulled when he was not given any special treatments. He studied not for education, but for attention and awards, and spent much of his time with annoying antics for fame that instead earned him a small notoriety. He was never an unskilled wizard, just a lazy one, and increasingly directed his talents to shortcuts and dodges; his gifts were wasted away, as the only spell he focused on was the Memory Charm. His abilities were eventually deteriorated beyond the point of recovery.

Despite his ineptitude in most other areas of magic due to long-term neglect and misuse, Lockhart was skilled in Memory Charms, it being the one spell he focused on for his entire life, and was conniving enough to deceive other wizards and witches to thoroughly reveal their work to him before erasing their memories and claim the credits for himself. He also appeared to have been a skilled writer, publishing many books consisting primarily of his embellishments of other people's achievements, taking credit for them as his own. Given his propensity for lying, however, it cannot be said for certain that Lockhart himself actually wrote any of the books. He also added many invented details in such feats to promote himself further, distorting facts with fictional concepts. Lockhart's fraudulent lifestyle has proven a certain degree of cunning, resourcefulness and disregard for rules, qualities that fall under the specifics of Slytherin, which he was narrowly able to avoid being sorted into.

On top of all his other flaws, Lockhart may have possessed a spiteful side. After learning from Hagrid that the gamekeeper hadn't read any of his books Lockhart was rather put out, and again when Hagrid told him Harry Potter was more famous than Lockhart without trying. After Hagrid's arrest, Lockhart blatantly claimed to be certain that Hagrid was truly guilty. Then again, it is unknown whether this was an actual hint of malice or just another sign of Lockhart's ignorance.

After losing his memory, however, Lockhart became an exceedingly nicer, happier, and humbler person even if he didn't particularly know it. Upon seeing Harry and Ginny after the spell hit him, he said hello to them very cheerfully and spent most of the time humming to himself absentmindedly. When addressed as Professor, he expressed surprise at the idea and remarked that he must have been hopeless at it without any reluctance at all. Despite forgetting his desire for fame and attention, he still enjoyed signing autographs and responding to fan letters, a trait that Harry noted remained unchanged.

Trivia

 * Originally, Gilderoy Lockhart was going to be played by Hugh Grant, but he was unable to due to scheduling conflicts. Coincidentally, one of Grant's middle names is "Mungo". Other actors who were offered the role were Alan Cumming (who refused upon learning he would be making less money than Rupert Grint and Emma Watson), Rupert Everett and Jude Law (who was deemed too young for the part and would go on to portray Albus Dumbledore in the Fantastic Beasts series).
 * In the Harry Potter and the Chamber of Secrets film, Lockhart has a photo of himself as a Ravenclaw Seeker. However, he most likely forged it, considering his history of creating fake exploits.
 * Originally, in the earlier drafts of Harry Potter and the Order of the Phoenix film, Lockhart would have reappeared like in the book, with Kenneth Branagh reprising his role. He was ultimately cut from the movie because it would have been required to build another set for the St. Mungo scene.
 * Since he attended Hogwarts from 1975 to 1982, he would have been at Hogwarts at the same time as Lily Evans, Severus Snape and the Marauders, which could partially explain Snape's disdain towards him.
 * Lockhart is inspired by a real person J.K. Rowling knew for two years. She has not revealed who this person is, but she claims to have barely exaggerated his personality on Lockhart. Some people assume that Lockhart was based on Rowling's ex-husband, but she has stated that he wasn't.
 * The film iteration of Lockhart has his worst character traits toned down to be more likable and comical, owing to his willingness to clear Harry from Snape's insinuations regarding his supposed involvement in Mrs. Norris' petrification, citing Snape that Harry was in detention with him, possibly because of Lockhart's useless classes and his most annoying treatment of Harry were cut from the film. His fraudulence and willingness to let Ginny die in the Chambers, however, still preserves him as detestable as much as in the book.
 * Kenneth Branagh was offered the chance to direct Harry Potter and the Prisoner of Azkaban; had he accepted, he would have directed his ex-wife Emma Thompson (who played Professor Sybil Trelawney).