The Manchester United striker scored the final goal in Recife after captain Rafael Marquez and Andres Guardado had netted in quick succession to set up a meeting with Netherlands.Mexico will join Brazil as the last 16 contenders from World Cup Group A after it beat Croatia 3-1 in Recife on Monday.
Both sides had impressed with eye-catching football in their respective matches so far in the competition, but a late flurry of goals ultimately booked Mexico a place against Netherlands in the second round.
Miguel Herrera's men may not have been fancied to pose much of a problem for Brazil and Croatia in Group A following a tumultuous campaign in the CONCACAF qualifiers, but its solid defense once again provided a sound foundation.
PHOTOS: USA vs. Portugal | U.S. fan reactions | Beautiful people in Brazil
Croatia had immense trouble creating clear-cut chances, while Mexico threatened on the counter and hit the crossbar through Hector Herrera early on.
The Mexicans were unlucky not to be awarded a penalty with 25 minutes to go following an apparent handball by Darijo Srna, but they were not denied soon after as captain Rafael Marquez headed them into the lead from a Herrera corner.
Andres Guardado and Javier 'Chicharito' Hernandez appeared to have made sure of the triumph with two goals in seven minutes and, although desperate Croatia pulled one back through Ivan Perisic, it was well beaten in the end as Ante Rebic compounded its disappointment with a late red card.
Herrera was adamant in the build-up that Mexico was not going to simply play for the draw it needed and, although Croatia controlled the early possession, the North Americans looked typically dangerous on the break.
The encounter's first chance saw Perisic blaze Ivan Rakitic's right-wing cross over in the fifth minute, but Mexico went mightily close just after the quarter-of-an-hour mark when Herrera struck the crossbar with a fierce effort from 30 yards.
Mexico went close again just a few moments later as Giovani dos Santos slipped a clever pass into the danger area for Oribe Peralta, but the new Club America forward lost his footing while pulling the trigger.
Croatia continued to look unconvincing in attack as an ill-tempered first half wore on.
The best opportunity Kovac's men could muster was a 31st-minute half-volley from Perisic, which comfortably cleared the bar from just outside the area.
Srna luckily escaped conceding a penalty in the 65th minute as he appeared to block a Guardado shot with his arms, but it all went wrong for Croatia soon after.
Marquez gave Mexico a deserved lead with 72 minutes on the clock, nodding in Herrera's corner despite Stipe Pletikosa's best efforts and a second swiftly followed.
With Croatia attempting to pile on the pressure, Mexico sprang an incisive breakaway and, after receiving a squared pass from substitute Chicharito, Peralta set up Guardado for an easy finish inside the area.
Mexico gave the scoreline a more resounding look in the 82nd minute as Marquez flicked on a cross and Chicharito was on hand to nod in from close range.
Perisic did get Croatia on the scoresheet with a clever finish from an acute angle, but Rebic ended any hopes of an improbable comeback with a callous challenge on Carlos Pena, earning a straight red as the European side goes home early.