He was voiced by Toby Jones.
In the books
He is a house-elf from the Malfoy family, who befriends Harry and goes out of his way to try to save his life numerous times. In the final book Harry Potter and the Deathly Hallows, he is killed by Bellatrix Lestrange while helping Harry and his friends escape from Malfoy manor. He was avenged by Molly Weasley, who killed Bellatrix Lestrange.
He is a major character in Harry Potter and the Chamber of Secrets and a supporting character in Harry Potter and the Goblet of Fire, Harry Potter and the Order of Phoenix, Harry Potter and the Half-Blood Prince, and Harry Potter and the Deathly Hallows.
After failing to find a job during Harry's third year at Hogwarts, Dobby came to work at the kitchens of Hogwarts along with many other house elves, including Barty Crouch Sr.'s fired elf, Winky. Dobby's only conditions was to be allowed to wear clothes, much to the disgust of the other elves, who considered him an insane and deranged outsider for his independent behavior. Over the course of his employment at Hogwarts, Dobby became close friends with Aberforth Dumbledore and spent much time at Aberforth's home in Hogsmeade. Aberforth seemed to have a close attachment to Dobby, since he felt very sorry when he learned he died. At Christmas, Hermione always made clothes as gifts for all hard-working house-elves at Hogwarts and she thought everyone loved them. In reality, Dobby confided to Harry that the he took all those gifts himself, as no elf dares to accept clothes, which are an insult for them and the symbol of unemployment.
He died saving Harry, Ron, Hermione, Luna Lovegood, Dean Thomas, Garrick Ollivander, and Griphook from the Malfoys and Voldemort's wrath. He was sent by Aberforth to help them but lost his life at the hands of Bellatrix Lestrange.
In the films
After Chamber of Secrets, Dobby was removed from the movie adaptations of all his next recurring appearances, despite J. K. Rowling's warnings, resulting with him suddenly re-appearing in the seventh movie after being absent for most of the films.
Like Kreacher, Dobby's interactions and friendship with Harry, Ron Weasley and Hermione Granger were omitted from the films. His main supporting roles in the books are given to other characters in the films, mostly to Neville Longbottom:
- In the 4th book, Dobby is the one who finds and brings gillyweed to Harry. Barty Crouch Jr., disguised as Alastor Moody had previously given a book about herbs to Neville, hoping that Harry would ask him help and get help from Neville's book, but Harry never did, so Crouch tricked Dobby into stealing a helping of gillyweed to give to Harry instead. The movie version has Crouch's first plan succeed with Neville finding the gillyweed for Harry.
- In the 5th book, when Dolores Umbridge banned all clubs at Hogwarts, Harry half-heartedly asked Dobby if he knew of a secret place in which they could have meetings for Dumbledore's Army. Dobby told him of the Room of Requirement and how to get into it. He knew of this secret room, because he had used it frequently to hide Winky after she became drunk from Butterbeer. Harry successfully made use of the room and thus was able to start holding Dumbledore's Army meetings. In the 5th movie, Neville finds the Room of Requirement as he was casually walking near it, in a bit of luck.
- When Dolores Umbridge found out about Dumbledore's Army, Dobby appeared in the Room of Requirement during's Harry's lesson, warning the students about Umbridge and her Inquisitorial Squad coming for them. Cho Chang's friend, Marietta Edgecombe, betrayed Dumbledore's Army to Umbridge, and Dobby immediately warned everyone that the Inquisitorial Squad was going to attack, even though the house-elves had been forbidden to tell anyone, but he told Harry as he was far more loyal to Harry Potter than to Umbridge or Hogwarts in general and also a free elf that was not forced to obey. When he heard, Harry ordered Dobby not to punish himself for disobeying a direct order from Umbridge. A chase from Draco Malfoy and the other Inquisitorial Squad members happened and Draco caught Harry. Despite Dobby's warning, Umbridge came into possession of Hermione's list revealing all D.A.'s members, who were all punished. In the movie version, all members are caught at once during their lesson, because there was no Dobby to warn them.
- In the 6th book, Harry ordered Dobby and Kreacher, the latter formerly the House of Black's house-elf who now belonged to Harry, to tail Draco Malfoy and learn where he disappears all day. Dobby and Kreacher followed Draco and revealed Harry that Draco was using the Room of Requirement. Kreacher insulted Harry and stated that Draco would be a better master. Dobby fought Kreacher and tearfully told him that Harry was a great wizard and that the Malfoys were not good masters for a house-elf. Dobby felt that helping Harry was an honour and didn't even sleep on his job. In the movie, Harry follows Draco himself.