"Wormtail and I did it. We had prepared the Polyjuice Potion beforehand. We journeyed to his house. Moody put up a struggle. There was a commotion. We managed to subdue him just in time. Forced him into a compartment of his own magical trunk. Took some of his hair and added it to the potion. I drank it; I became Moody's double. I took his leg and his eye."
-- Barty Crouch Jr. / Fake Moody (GF35)
After Harry and Cedric were abducted and returned from Voldemort and the graveyard after the Third Task of the Triwizard Tournament, an apparently sympathetic Mad-Eye Moody pulled Harry away from the dead Cedric and took him back to the castle. As they talked, Harry realized that Moody was asking many questions in a strange way about the graveyard and Voldemort, and that something was wrong. Moody said he was ready to kill him in honor of the Dark Lord when Dumbledore, McGonagall and Snape burst in and stunned Moody, who was actually Barty Crouch Jr. in disguise through the use of Polyjuice Potion.
The real Moody was found at the bottom of the seven-lock trunk, malnourished and lacking his carved wooden leg and magical eye. He had been held captive the whole school year by Barty Jr., who used his hair to make the Polyjuice and asked him questions about various things to keep up the disguise.
Winky the House-elf was brought to the DADA office, as well as Veritaserum for truth-telling which Dumbledore administered. Barty told the story of how he escaped from Azkaban with the help of his parents, and that the Dark Lord found out about him through Bertha Jorkins, who had seen him alive before being obliviated, and was vacationing in Albania to recover. The Dark Lord searched her mind and killed her, then he and Wormtail returned to England, hatching the plan to use Barty Jr. as the Fake Moody to rig the Twiwizard Tournament so that Harry would end up in the graveyard to be killed. Instead, Cedric was killed and Harry’s wand with the twin-core to the Dark Lord’s thwarted the plan because of the Reverse-Spell effect. Barty Jr. admitted he had also killed his father, as well as stolen the Polyjuice ingredients from Snape’s office, which Harry saw on the Marauder’s Map but assumed it was Barty Sr.