Creation and development
Rubeus Hagrid was one of the first characters Rowling created. In a 1999 interview, she explained that the name "Hagrid" is an Old English word derived from hagridden, meaning 'tormented by hags'. She said it means "you'd had a bad night" and she explained that Hagrid "has a lot of bad nights" due to his heavy drinking. In Latin, "Rubeus" means "red", and was chosen because Rowling conceived of Hagrid as an "earthy, warm, and physical man".
The character of Hagrid and conversations between him, Harry Potter, Ron Weasley and Hermione Granger in his hut are expository through the series, due to the fact that the trio frequently discover things about Albus Dumbledore and Hogwarts by talking with Hagrid, as he has a habit of letting slip bits of information that were specifically confided to him. He was also one of the first characters to imply that the idea of thinking of wizards as "pure-bloods" and "half-bloods" is a dated concept.
Rowling has stated in an interview that Hagrid was in Gryffindor house during his time as a student. When he comes into possession of an acromantula (Aragog), he is expelled from Hogwarts as his pet is believed to be the "monster of Slytherin". However, persuaded by Dumbledore (who at the time was the Transfiguration teacher), Headmaster Armando Dippet agrees to train Hagrid as gamekeeper, allowing the boy to remain at Hogwarts. By the time Harry attends Hogwarts, Hagrid is also the Keeper of Keys and Grounds; the former, according to Rowling, means "that he will let you in and out of Hogwarts." Part of his job includes leading the first years across the lake in boats, upon their initial arrival at Hogwarts.
When discussing the killing off of characters in her books, Rowling said that she always knew she was "working towards the point where Hagrid carried Harry out alive – but supposedly dead – out of the forest". She said she had planned from very early on that Harry would walk to his death accompanied by the 'ghosts', and that "he would emerge in Hagrid's arms". In her own words, "that's what always kept Hagrid safe". She said "Hagrid would have been a natural to kill in some ways", but that the mental image of this moment – a big fatherly Hagrid carrying the limp Harry in his arms – was so strong it decided his fate. Although some fans were afraid that Hagrid would die in the final novel, Rowling had always planned for him to survive. She also liked the circular notion of Hagrid both bringing Harry into the world, and then bringing him back from the dead. During an interview in 2007, when asked if Hagrid did marry, Rowling answered that Hagrid developed a relationship with a giantess, but it did not work out.