The real Alastor "Mad-Eye" Moody was imprisoned in a locked, magically sealed trunk in Barty Crouch Jr.'s possession.
Crouch Jr., using Polyjuice Potion, took Moody's place at Hogwarts. He kept the real Moody alive (to harvest hair for the potion) but confined him in the trunk, hidden in his quarters, with a powerful Silencing Charm to prevent detection. Moody was rescued after Crouch's exposure at the end of the Triwizard Tournament.