Technically it was Barty Crouch Jr. who put Harry Potter's name in The Goblet of Fire. He put Harry Potter's name under a different school so that there would be no one else competing against him. This was to guarantee that Harry Potter would participate in the Triwizard Tournament and eventually, with help from the fake Professor Moody, reach the Triwizard cup at the end which was actually a portkey to Lord Voldemort. The real Alastor Moody was locked in his office at this time.