It is believed that Harry just retrieved the Marauder's Map from Barty Crouch Jr's desk after his death. Barty was disguising himself as Mad-Eye Moody and trying to eventually send Harry to Voldemort using the Triwizard Cup as a portkey. However, the Marauder's Map could risk this mission from succeeding, which is why he confiscated it from Harry.