A Mexican international, Hernández is the country's all-time leading goalscorer. He made his debut for the national team in September 2009 in a friendly match against Colombia. He has represented Mexico at the 2010 FIFA World Cup, the 2011 CONCACAF Gold Cup, the 2013 FIFA Confederations Cup, the 2014 FIFA World Cup, the Copa América Centenario, the 2017 FIFA Confederations Cup and the 2018 FIFA World Cup. He was the 2011 Gold Cup's top scorer with seven goals and was named the most valuable player of the tournament.