Hernández played for his country at different age levels and made his senior debut for El Salvador in an October 2007 friendly match against Costa Rica, coming on as a second-half substitute for Juan José Gómez. He was a non-playing squad member at the 2003 CONCACAF Gold Cup.