On 14 December 2005, at age 20, Ochoa made his debut for the Mexico national team in a friendly match against Hungary, which Mexico won 2–0. Ochoa was called-up by coach Ricardo La Volpe for the 2006 FIFA World Cup as the third-choice goalkeeper. After the World Cup, newly appointed manager Hugo Sánchez called Ochoa into the national side as a deputy to Mexico’s then-number one, Oswaldo Sánchez. Ochoa was a part of the squad which finished runner-up at the 2007 CONCACAF Gold Cup. He also played for Mexico at the Copa América that same summer, being praised for his performance in the 2–0 victory over Brazil. Ochoa won the 2009 CONCACAF Gold Cup with Mexico. He started in every match, including the final against the United States. He made his 2010 World Cup qualification debut on 28 March 2009 against Costa Rica, eventually playing all qualification matches. Ochoa made the final 23-man cut for the 2010 World Cup, but was controversially named back-up goalkeeper to veteran Óscar Pérez by coach Javier Aguirre.