In Harry Potter and the Half-Blood Prince, Bellatrix Lestrange and the Death Eaters attack the area around Hagrid's hut while searching for Harry, but no spell is cast directly on the hut itself.
The hut's destruction comes later, in Harry Potter and the Deathly Hallows, when Death Eaters burn it to the ground during the Battle of Hogwarts buildup. The film adaptation of Half-Blood Prince adds a brief fire scene, but the book makes clear the hut survives that night intact.