With Honduras drawing 2-2 with Panama and Costa Rica held to a 1-1 draw in Jamaica, the Americans stand on top of the CONCACAF standings on 16 points with two games remaining.
Costa Rica, who also qualified on Tuesday, are on 15 points with Honduras on 11 points still fighting for the third automatic qualification spot.
The defeat leaves Mexico deep in trouble though - they are in fifth place, level on eight points with fourth-placed Panama and with only a slim chance of making third place.
'El Tri', who started qualification as clear favourites to top the group, still have plenty of work ahead to even get the fourth spot and get a shot at Brazil via a playoff with Oceania winners New Zealand.
The Americans had to wait for almost an hour after the game to know their spot in Brazil was secure - needing Honduras to pick up at least a point.
While players sat in the changing room watching the late game on television, hundreds of fans stayed in the stadium hoping to celebrate qualification and were rewarded with the US team returning to the field to complete a lap of honour.
"This is a huge achievement for all of us," coach Juergen Klinsmann said. "We can all be extremely proud of this team who gave everything. It's a huge milestone whenever you make it to the World Cup, the biggest competition in this sport, especially hosted in Brazil, one of the biggest soccer nations.
"It means a lot to all of us. To our fans and to this country as well," said the German, who took charge of the team in 2011.
For Mexico, the defeat to their biggest rival was a painful one on several levels.
"I don't know what to tell you, we're in debt with the people and very ashamed," midfielder Christian Gimenez told Mexico's TV Azteca.
Mexico coach Luis Fernando Tena, taking charge for the first time following the firing of Jose Manuel de la Torre on Saturday, recalled Andres Guardado and Javier Hernandez to the starting line-up and their impact was felt early.
With Giovani dos Santos and Guardado stretching the US defence, Argentine-born playmaker Gimenez found plenty of space and forced Tim Howard into a fine diving save in the 19th minute.
Moments later, Gimenez fired a free-kick just over the bar as Mexico took the game to the Americans.
Mexico keeper Jose Corona did well to block a diving header from Johnson from a rare US attack but the danger was still coming from the visitors.
Dos Santos dribbled in the box and tested Howard with a stinging drive and then on the stroke of half-time, the home keeper's reflexes were alert enough to keep out a header from Diego Reyes.
It was goalless at the break but Mexico had been superior in all departments with the Americans sorely missing the presence of the injured Michael Bradley in central midfield and the attacking threat of the suspended Jozy Altidore.
However, four minutes after the interval, the US grabbed the lead when Donovan swung in a corner and Johnson broke free of his marker to power in a header past Corona who was caught in no-man's land.
The noisy 24,584 capacity crowd at the compact Crew stadium sensed victory was within reach and that confidence appeared shared by their team, who began to dominate the midfield.
Mexico, by contrast, looked utterly crestfallen by the goal, their belief faded dramatically and there was no way back for them after substitute Mix Diskerud slipped the ball across the box for Donovan to make it 2-0 in the 78th minute.
Clint Dempsey's awful penalty in the final seconds, after he had been fouled in the box, barely went noticed by the celebrating fans, who can now start planning their trips to Brazil.
- Sports & Recreation