Cedric was portrayed in the film by Robert Pattinson. This role marked Pattison's cinematic debut.
Cedric Diggory was a member of Hufflepuff House and a prefect at Hogwarts School of Witchcraft & Wizardry. He was well-liked by his housemates, teachers, and most of the girls in school. He put his name forward for participation in the Triwizard Tournament and was strongly supported by the entire school when the Goblet of Fire appointed him as Hogwarts' chosen Triwizard Champion. However, the Goblet of Fire also revealed the name of another Hogwarts student: Harry Potter. Harry was too young to participate in the Tournament and had no wish to do so, but was bound by a magical contract to compete despite the fact that someone had anonymously planted his name in the Goblet and tampered with the cup to ensure his entry.
Under normal circumstances, Cedric would likely have received a great deal of media attention for his participation in the Triwizard Tournament, but Harry Potter's entry left Cedric completely overshadowed, much to his father's dismay. Nonetheless, Cedric and Harry would support each other through the course of the competition, with Cedric standing up for Harry against the slander he received from the students prior to the first event and dropping hints to Harry on what to do with his golden egg after the event's completion.
During the third and final event of the Triwizard Tournament, Cedric and Harry hunted for the Triwizard Cup inside an enchanted hedge-maze. Twice Cedric had been saved by Harry inside the maze and the two decided to take the cup back together, but the cup turned out to be a Portkey that transported them both to a graveyard in the small village of Little Hangleton. There, the boys encountered Peter Pettigrew, devoted servant to Lord Voldemort, who held the dishevelled form of the Dark Lord in his arm. Voldemort required Harry's blood in order to restore himself, but Cedric was of no use to him and he commanded Pettigrew to kill him. Pettigrew struck Cedric down with the Killing Curse using Voldemort's own wand.
Although dead, Cedric still had a role to play in the night's events. After Voldemort was reborn, he and Harry engaged in a duel, during which their wands - which shared a wand core from the same phoenix - connected, creating the effect known as Priori Incantatem, the backward spell effect. Voldemort's wand began regurgitating the last spells it had cast in reverse. Cedric's shadow emerged from Voldemort's wand, along with the shadows of Frank Bryce, Bertha Jorkins, and James and Lily Potter. Cedric's "echo" asked Harry to take his body back to his parents while he helped the others. Harry agreed, and when he broke the wand connection, the shadows advanced on Voldemort, shielding Harry. Harry used the opportunity to take hold of Cedric's body, then summon the Cup to himself and transport them both back to Hogwarts. Cedric's body was returned to the grounds, and Harry clung to it, refusing to let it go until Albus Dumbledore pulled him away. The crowd that had gathered for the Third Task erupted into screams when they realised what had happened, and Cedric's parents were grief-stricken by the fate that had been befallen their son (although his mother attempted to console herself by reflecting that Cedric hadn't suffered in death, and that he had died after winning the Tournament, believing that the victory would have made him happy).
Cedric's death was widely felt throughout the school, and on 26 June the Leaving Feast was turned into a memorial for him, with black banners replacing the house colours. Dumbledore delivered a tribute to Cedric, and relayed the events that had led to his death to the student body, telling them, against the explicit wishes of the Ministry of Magic, that the young Hufflepuff had been murdered by Lord Voldemort himself.