He is sentenced to death after an attack on Draco Malfoy, which was provoked by Malfoy's disrespectful behaviour, but is rescued by Harry and Hermione and goes into hiding with Sirius Black at 12 Grimmauld Place.
After Sirius's death, Buckbeak returns to Hagrid's care, but is renamed Witherwings to hide his identity. As with all hippogriffs, Buckbeak is fond of eating small mammals, preferably ferrets. This is irony, as Mad-Eye Moody temporarily transforms Malfoy into a ferret the year after Draco had tried to get Buckbeak killed.