A wonder strike in extra-time from Maxi Rodriguez gave Argentina victory in a pulsating end-to-end encounter.
Rodriguez struck wonderfully after 98 minutes
Mexico took a surprise lead after five minutes when Rafael Marquez got on the end of a Mario Mendez free-kick.
Argentina replied five minutes later when a corner was forced home by a combination of Hernan Crespo's foot and Jared Borgetti's head.
Rodriguez set up a quarter-final with Germany when he chested Juan Sorin's pass and stunningly volleyed home.
The pre-match script had Argentina stroll written all over it.
Jose Pekerman's team were the outstanding side in the tournament's opening stage, while Mexico were far from convincing in progressing from a weak group.
But Mexico showed they were not in Leipzig to make up the numbers from the kick-off as they threatened to cause the 2006 World Cup's first major upset.
Argentina had already survived a scare before Marquez put them into an early lead.
Mendez's whipped-in free-kick was flicked on by Pavel Pardo and Gabriel Heinze allowed Marquez a free run to the back post, where the accomplished centre-half finished like an expert centre-forward.
The Argentina fans inside the Zentralstadion may have been shocked, but their players kept their cool and within five minutes they were back on level terms.
Borgetti got his head down to bravely attempt to clear a Juan Riquelme corner and was unfortunate to see it deflect past his own keeper.
Crespo wheeled away confidently claiming his third goal of the tournament but it was officially handed to Borgetti, by all except German television.
However, and despite Borgetti seemingly having the decisive touch, it was later credited to the Chelsea forward.
The two-time World Cup winners began to dictate the play with Riquelme pulling the strings and Esteban Cambiasso attempting to unlock Mexico's offside trap.
Marquez was back on defensive duty to block Crespo, while the Chelsea striker lobbed over Oswaldo Sanchez after again being put through by Cambiasso.
Borgetti headed into his own net, but Crespo was given the goal
But Mexico showed some resilience of their own and Bolton's Borgetti was a constant handful on the floor and in the air.
The striker, who recovered from a thigh injury to return to the starting line-up, tested Roberto Abbondanzieri with a long-range effort and was poised to pounce when the keeper later dropped a cross.
Argentina received a let-off of huge proportions when Abbondanzieri rolled the ball out and Heinze had a momentary lapse of concentration.
Fonseca leapt at the chance but with a clear run on goal he was felled by Heinze.
Referee Massimo Busacca chose the wrong option by only showing a yellow card to the Manchester United defender.
Mexico's Argentine boss Ricardo La Volpe berated the official from the sidelines and his side were poorly rewarded when Marquez hit the free-kick straight at the wall.
There was more end-to-end action after the break as Borgetti was clean through on goal only to be denied by Abbondanzieri and Javier Saviola was denied by the impressive Sanchez.
The pace of the game inevitably slowed, with Argentina's patient passing game dictating the action.
But even with the introduction of Lionel Messi and Carlos Tevez they found the Mexican defensive wall too sturdy to break down during the 90 minutes, although Messi had an effort controversially ruled out for offside in second half injury-time.
With chances not forthcoming it needed something special and Rodriguez obliged in sensational fashion eight minutes into extra-time.
He brilliantly teed himself up by chesting a Sorin cross-field pass and then unleashed a left-foot volley past Sanchez's despairing dive and into the top corner.
A weary Mexico had no answer but they go home knowing they tested Argentina to the maximum.
Argentina: Abbondanzieri, Ayala, Heinze, Scaloni, Sorin, Cambiasso (Aimar 76), Riquelme, Maxi, Mascherano, Saviola (Messi 84), Crespo (Tevez 75).
Subs Not Used: Franco, Coloccini, Palacio, Milito, Cufre, Cruz, Burdisso, Gonzalez, Ustari.
Booked: Heinze, Sorin.
Goals: Crespo 10, Maxi 98.
Mexico: Sanchez, Salcido, Marquez, Guardado (Pineda 66), Osorio, Castro, Mendez, Pardo (Torrado 38), Borgetti, Morales (Zinha 74), Fonseca.
Subs Not Used: Corona, Suarez, Franco, Ochoa, Bravo, Garcia, Arellano, Rodriguez, Perez.
Booked: Marquez, Castro, Torrado, Fonseca.
Goals: Marquez 5.
Ref: Massimo Busacca (Switzerland).
Fifa man-of-the-match: Maxi Rodriguez
Rafael Marquez's opening goal marked the 16th match at the 2006 World Cup in which a goal was scored in the first 10 minutes. No other edition of the World Cup finals has contained so many early opening goals.
Hernan Crespo has scored in the last four World Cup matches he has played in. The last game in which he did not score was on 7 June 2002 against England. Jairzinho and Just Fontaine both scored in six consecutive World Cup matches played. Crespo is the first player to score in three different encounters at this tournament. In 2002, Ronaldo scored in six different matches.
Argentina are now unbeaten in their last five World Cup contests which is two matches shy of their all-time record of seven unbeaten on the bounce in 1986 when they won the World Cup in Mexico. This defeat was Mexico's 22nd loss in World Cup history.
Trivia stats source: Infostrada Sports