International Friendly: Mexico 1 Ecuador 0
Hernandez scored the only goal of the match in the 14th minute - moving second alongside Cuauhtemoc Blanco on 39 goals.
The 26-year-old - on loan at Real Madrid - is just seven goals adrift of Borgetti.
Mexico goalkeeper Corona also played a key role, denying Miller Bolanos on three occasions, including from the penalty spot in the 71st-minute.
Ecuador - playing their first match since October last year - settled quickest of the two teams in front of a vocal Los Angeles crowd and the South Americans should have taken an early lead, if not for Corona.
Corona - the Mexico number one with 2014 World Cup hero Guillermo Ochoa struggling for game time at Malaga in Spain - denied Bolanos twice, including from close range in the sixth minute after the Ecuador midfielder was played in by Felipe Caicedo.
Mexico slowly began to find their rhythm and it was not long before Hernandez gave his side a 14th-minute lead in spectacular fashion.
Hernandez won possession outside the penalty area and beat two defenders before curling the ball past goalkeeper Alexander Dominguez and in off the post.
Corona was on hand to thwart Ecuador again, this time denying Jefferson Montero, who was replaced two minutes before half-time, from close range with less than 10 minutes remaining in the first half.
The second half was another end-to-end contest, but neither side really created any clear-cut chances up until the 71st minute when referee Christopher Reid controversially pointed to the spot.
Reid awarded a penalty after Angel Mena - the first-half substitute - fell to the floor as Diego Reyes attempted to shield the ball.
But Bolanos missed the spot-kick, Corona diving low to preserve Mexico's advantage and ultimately their victory.