“It must have been Fiendfyre! [C]ursed fire—it’s one of the substances that destroy Horcruxes, but I would never, ever have dared use it, it’s so dangerous—how did Crabbe know how to—?”
-- Hermione Granger (DH31)
When the Room of Requirement is destroyed by the Fiendfyre spell cast by Crabbe, the Diadem of Ravenclaw is caught up in the inferno. Harry sees it tossed into the air as he speeds toward the door to escape and catches it. When he is outside of the room and the door is shut, he looks at the diadem. It is blackened and covered with soot, and a tarry substance is oozing out of it. Fiendfyre is one of the few things which will destroy a Horcrux, and it did its work on the diadem. When harry touches it, it shatters.