Substitute goalkeeper Ethan Horvath capped off a superb performance with a penalty save deep into extra time to preserve his team's one-goal lead. Christian Pulisic, who was quiet for much of the encounter, smashed a crucial spot-kick into the top corner in the 114th minute.
The hot-tempered victory earned the U.S. men's team its first competitive win over Mexico since September 2013, and will provide encouragement ahead of its upcoming World Cup qualification campaign.
The madness started after 63 seconds. Mark McKenzie had an opportunity to clear his lines after a determined run from Jesus Corona, but it didn't quite go according to plan. McKenzie gave the ball straight back to Corona after a loose pass, and the Mexican attacker smashed it into the roof of Zack Steffen's net.
Mexico appeared to take a two-goal lead when Hector Moreno scored at the back post unmarked, but the header was ruled out following video review. The scores were level when Giovanni Reyna converted the rebound after Weston McKennie's header hit the upright.
Horvath, who was introduced in the 69th minute after Steffen was withdrawn due to injury, was powerless when Diego Lainez gave Mexico the lead 10 minutes later. The Real Betis winger easily cut inside Tim Ream before jabbing home a near-post finish.
It didn't last. The pulsating encounter was even once again when McKennie - a constant threat at set-pieces - headed Reyna's corner past Guillermo Ochoa. Horvath then completed a series of fine saves near the end of 90 minutes to take the game into extra time.
The additional half-hour was understandably scruffy as the teams tired, but it was no less entertaining as players on both sides tried to land the knockout punch. And while Pulisic delivered the winning goal, it was Horvath - born a short drive from Empower Field in Denver - who wrote his name in American soccer's history books.