Dobby dies in Harry Potter and the Deathly Hallows – Part 1 (2010).
He is killed by Bellatrix Lestrange's knife while apparating Harry and friends to safety from Malfoy Manor. His last words: "Such a beautiful place, to be with friends. Dobby is happy to be with his friend, Harry Potter."