In Harry's third year, in Harry Potter and the Prisoner of Azkaban, Cedric captained the Hufflepuff team which beat Gryffindor. In Harry Potter and the Goblet of Fire, Cedric was selected to be the Hogwarts champion in the Triwizard Tournament. When Harry is somehow also selected, Draco Malfoy makes Support Cedric Diggory badges for the Slytherins.
Cedric, along with Moaning Myrtle, assists Harry in solving the clue of the second task of the Triwizard tournament, in return for the help Harry had given him in the first task.
At the end of the third task Cedric refuses to take the cup without Harry, each of them having helped the other in the maze, so they grasp it together. The cup turns out to be a portkey and it teleports them to Voldemort and his servant Wormtail. Voldemort had Wormtail murder Diggory with the Avada Kedavra curse. Harry escapes, bringing with him Cedric's body in accordance with Cedric's posthumous wish: that he be brought back to his parents.
Cedric's father is Amos Diggory, who works at the Ministry of Magic. Before he was killed, Cedric's girlfriend was Cho Chang. He danced with her at the Yule Ball.
His wand had a unicorn tail hair in it. It is remarked in the first book that "Always the innocent are the first victims." The character, Ronan, was referring to unicorns, but he could also have been forshadowing Cedric's murder. Cedric was the first of Voldemort's innocent victims after his return to power.