The first half was a tight and nervous affair for both sides and it was the Mexicans who were closest to breaking the deadlock after 15 minutes.
F.C Porto midfielder Hector Herrera fired a great left foot shot from 25 yards-out that thumped the underside of the crossbar and bounce away from goal.
Croatia struggled to create any clear chances in the first half as they knew only a win would earn them qualification, and thus looked to attack in the second half.
Despite that, they rarely tested Guillermo Ochoa in the Mexican goal, and went behind on 72 minutes.
Herrera, who was superb all night, delivered a stunning corner that was met by Rafael Marquez who beat Stipe Pletikosa from close range.
They didn’t have to wait long for the second though, as Andres Guardado finished superbly with his left foot after a lovely ball in from Oribe Peralta on the right winger.
Manchester United striker Javier Hernandez scored their third on 82 minutes after diverting the ball from close range following a Marquez header.
Croatia, who knew they were now out of the World Cup, scored a consolation goal from Ivan Perisic from close range in the 87th minute. Yet the Europeans night got worse as Croatian substitute Ante Rabic was sent off in the last minute for a horrible lunge.
That didn’t matter as Mexico secured second spot in Group A and book a last 16 match with Netherlands, whilst Croatia book their flight home.