Fred Weasley died in an explosion fighting alongside his brother Percy. He died while defending the passageway of the castle in the Battle of Hogwarts.