died in the battle at Hogwarts in Chapter 31 of Harry Potter and the Deathly Hallows.
Details:
Fred and Percy appeared backwards, both of whom were fighting the masked man with the hood.
Harry, Ron, and Hermione ran forward to help, and a series of bright lights shone in all directions. The man who fought with Percy quickly retreated, and his hood slipped off. They saw his high forehead and mottled hair.
"hello, minister!" Percy shouted, and threw a curse at Sinknes. Sinknes lost his wand and grabbed the chest of the robe with his hand, which was obviously very uncomfortable. "I said I was going to resign, right?" Percy added.
"You're kidding, Percy!" Fred shouted, and the death eater who fought with him collapsed under the impact of three coma spells. Sinknes fell to the ground with many small nails all over his body, as if he were becoming a sea urchin. Fred looked at Percy happily.
"You're kidding, Percy ... I haven't heard you joke for a long time, since you-"
The air suddenly exploded. They just gathered together, Harry, Ron, Hermione, Fred, Percy, and two death eaters at their feet, one under a coma spell and the other under a transfiguration spell; At the moment when the danger seemed to be coming, the world was torn apart. Harry felt that he was flying in the air. He could only hold on to the thin stick, his only weapon, and cover his head with his arms: he heard the shouts and screams of his companions, but he couldn't know what happened to them-
Then, the world gradually turned into pain and a blur: half of his body was buried in the ruins, and the corridor had just been horribly attacked. The cold air told him that one side of the castle had been blown away, and the warm and sticky feeling on his cheek told him that he was bleeding a lot. Then, he heard a scream that worried him. The pain expressed in that cry was by no means caused by flames or spells. Harry stood up unsteadily, and his heart was extremely scared, more scared than at any time in his life ...
Hermione struggled to stand up from the ruins, and three red-haired people gathered in the place where the wall was blown up. Harry grabbed Hermione's hand, and they stumbled past the rubble and chips.
"no-no-no!" Someone was shouting, "No! Fred! No! "
Percy shook his brother, Ron knelt beside them, and Fred's eyes were staring blankly, with the last smile on his face.