Dobby died in Deathly Hallows shielding Harry from Bellatrix Lestrange's thrown knife (intended for Harry). A selfless act of loyalty and love.
Highlights sacrifice, friendship, and tragedy of prejudice.