The Central Americans scored three times in the space of 10 minutes as Rafael Marquez nodded them ahead with a little less than 20 minutes remaining, before Andres Guardado and Javier Hernandez made sure of the victory.
Here, Sports Mole takes an in-depth look at another incredible match in Brazil.
On target: 3
On target: 4
Was the result fair?
Absolutely. Neither side enjoyed much success in front of goal in a rather tepid and nervy first half, but it was Mexico who looked the most threatening going forward. Croatia struggled to create anything as Mexico comfortably dealt with their attacks, and neither keeper had to make a meaningful save in the opening 45 minutes.
Mexico came out with a slightly different gameplan in the second half having tired Croatia out in the first, and it worked perfectly. As the game wore on, it was the Central Americans who began dominating proceedings despite only needing a draw to progress.
Croatia did nowhere near enough to win this match this evening, with their first threatening moment coming when they scored the consolation goal in the 87th minute. Mexico, meanwhile, produced a tactical masterclass and thoroughly deserve their place in the last 16.
Very disappointing. Having impressed in the defeat to Brazil and victory over Cameroon, there were high hopes that Croatia might be able to rescue their World Cup campaign tonight and go on to fulfil the tag of dark horses bestowed on them by many people before the tournament.
However, despite having the likes of Luka Modric, Ivan Rakitic and Mario Mandzukic in their ranks, they didn't pose any threat in the final third for the vast majority of the game. They were stifled by a disciplined Mexican defence and simply didn't have an answer for it.
They can have no complaints at having lost this match as they created two good chances throughout - both of which came after the 87th minute and when the game was dead and buried. Niko Kovac will be wondering why his side failed to perform when they had to tonight.
For much of the match, it seemed almost as uninspiring as Croatia's performance. While Mexico did pose more of an attacking threat throughout, the only time they really came close to scoring was through Hector Herrera's magnificent long-range effort that crashed off the underside of the bar.
However, as the game plan began to emerge it became a very impressive display from the Mexicans. They began to take control of the match when Croatia started to tire in the final 20 minutes, and they had threatened to get the opening goal for a few minutes before Marquez nodded them into the lead.
They kept on attacking to pick off the tiring Croatian defence and quickly got a flurry of goals that, for one moment, looked like they could put Mexico in with a chance of topping the group. In the end, they finish second behind Brazil to set up a last-16 tie with Netherlands, but after watching this game the Dutch will know that they are in for a tough match.
Sports Mole's man of the match
Rafael Marquez: Playing in his fourth World Cup, the Mexico captain looked ageless tonight. Croatia's talented attacking players simply couldn't get a sniff as they were thwarted time and again by a defensive line led by Marquez.
He then showed his aerial ability at the other end with a header to put his side on the way to the victory, taking the pressure off them at the other end of the field as well, with Croatia then needing two goals to progress. He will be unhappy with conceding a late goal, but overall it was a very good display from the veteran.
This one goes to Stipe Pletikosa, who should have done better with the opening goal of the game. Marquez's header was down into the ground, but the Croatia keeper still got there in time and should have been able to push it away. As it was, the ball crept past him and suddenly Croatia needed two goals to progress - a very unlikely target considering how the match had gone up until that point.
Ravshan Irmatov had two big calls tonight, and he got one right and one wrong. The first saw Mexico screaming for a penalty as Guardado thought that Darijo Srna had handled inside the area. While the ball did travel very quickly, Srna's hands were away from his body and blocked a goalbound shot, so it should have been a spot kick.
The second decision was the red card, but he had little choice really. It wasn't the most robust red-card challenge you will ever see, but it was high, late and dangerous, and Rebic can have no complaints at being given his marching orders.
Croatia: After the disappointment of their World Cup exit settles down, Croatia will focus on qualifying for Euro 2016, with their first group game coming against Malta on September 9.
Mexico: Mexico, meanwhile, face a last-16 tie with the Netherlands in what should be a very intriguing encounter.