The Schalke striker fired home a penalty to put the Dutch through the quarter-finals of the World Cup as they inflicted an agonising defeat on Mexico who were within two minutes of an historic win, leading through Giovani dos Santos' excellent strike.
Wesley Sneijder's blistering volley pulled his side level before Arjen Robben won a penalty and substitute Huntelaar thumped it home to make it 2-1 send the Dutch through.
It was familiar misery for Mexico - it is now at six consecutive World Cups that they have been knocked out at this stage of the tournament.
Mexico looked more comfortable with the oppressive heat and took the game to their opponents. Herrera caused the Dutch fans to sweat even more when Ron Vlaar followed through a clearance with a high foot in the head, but his penalty claims were waved away. Dos Santos then combined nicely with Oribe Peralta but the Villarreal striker's low shot was gathered by Jasper Cillessen.
The Netherlands were reliant on a flash of brilliance from Robben or Robin van Persie and each struck fear in Mexico. First Van Persie took the ball down and seemed poised for a trademark lash at goal but, off balance, sliced his volley badly wide.
Just before half-time Rafael Marquez slipped to concede possession to Van Persie who found Robben running into the penalty area only to be taken down by a combination of Marquez and Hector Moreno. Only Pedro Proenca, the Portuguese referee, could explain why he did not award the penalty.
Mexico's dominance paid off three minutes after the break, when Dos Santos fastened onto Vlaar's attempted headed clearance and, running across goal under pressure from Daley Blind, smacked a low shot back inside the far post.
The Netherlands had to respond and they gave it everything. Only a point-blank save from Guillermo Ochoa kept them out - Stefan de Vrij arrived to thump in Robben's corner but the ball hit Ochoa's gloves and head and glanced onto the inside of the post and clear.
Coach Louis van Gaal's last throw of the dice was to give Huntelaar his first chance of the tournament, in place of the tired-looking Van Persie.
With three minutes of normal time left, Huntelaar won a header from a corner and Sneijder lashed in a volley with such power that Ochoa did not even move.
Then came Robben, once again making the most of contact inside the box from Marquez, leaving Huntelaar to make the difference from the spot.