Here's what actually happened:
* Barty Crouch Jr. was a Death Eater who was imprisoned for torturing a family of Muggle-borns. He escaped Azkaban with the help of his mother.
* He impersonated Moody by using the Polyjuice Potion and was able to infiltrate Hogwarts as a Defense Against the Dark Arts teacher.
* He planned to help Voldemort return by influencing Harry to enter the Triwizard Tournament.
* He captured Harry, then used the Imperius Curse on Cedric Diggory to force him to enter the Triwizard Tournament as well.
* Barty Crouch Jr. sabotaged the third task, leading to the death of Cedric Diggory.
* He kidnapped Harry, and intended to deliver him to Voldemort. However, Harry escaped.
* Barty Crouch Jr. was revealed by Alastor Moody, who had regained control of his body for a brief time.
* He was apprehended by the Aurors and later killed by his own mother, who was trying to protect her son's secret.
So, while Mad-Eye Moody was presumed dead during the events of the fourth book, he was never actually killed by Voldemort. Instead, he was impersonated and eventually murdered by Barty Crouch Jr..