Ghana became only the 3rd African country after Cameroon in 1990 and Senegal in 2002 to book a place in the quarter-finals of the Mundial.
Kevin-Prince Boateng gave Ghana the lead, but London Donovan drew Ghana level, but Asamoah Gyan scored the match-winner during extra time.
The Black Stars, who were the sole African representative left in the continent's first FIFA World Cup, set a date with Uruguay in Johannesburg on 2 July.
The west Africans stunned the US in just the fifth minute after Ricardo Clark had given possession away in midfield.
Boateng ran at the defence and, having shifted the ball to the left, beat goalkeeper Tim Howard at his near post with a left-footed shot from the edge of the area. Left reeling, the US were second best until the break.
Their best in the opening period came in the 35th minute, when Jonathan Mensah gave the ball away in his own third to Clint Dempsey. The Fulham man slid the ball to Robbie Findley, who raced clean through on Richard Kingson, but the goalkeeper reacted well to save with this left foot. Coach Bob Bradley's reaction to a lacklustre first-half performance was to bring on attacking midfielder Benny Feilhaber at half-time, and the move almost paid immediate dividends.
Donovan's pace made the chance down the right, and Jozy Altidore did well with the LA Galaxy player's cross to feed the on-rushing Feilhaber. But Kingson came out aggressively and pulled off a fabulous reaction save. Ghana were being pegged back at this stage, and on the hour mark Dempsey skinned Gyan at the edge of the area and broke free into the box. Mensah clattered into him to concede the penalty, and Donovan calmly slotted in his kick off the inside of the post.
As the second half wore on, the US continued to ask questions of the Ghana defence, but Kingson saved the Black Stars twice in succession. In the 68th minute, he raced 15 yards off his line to clear the ball at Altidore's feet, and eight minutes later he got down well to smother Michael Bradley's shot after the coach's son had beaten the offside trap. Altidore had another chance in the 81st minute, but the defence did just enough to put him off and he fired wide from ten yards.
However, just as they did at the start of the match, Ghana opened the extra time with a goal. The impressive Ayew, son of Ghanaian legend Abedi Pele, spun a long ball with the outside of his left foot into the path of Gyan. The Rennes man held off two defenders and smashed the ball past Howard for his third goal of the tournament and his seventh for his country in 2010.
The US, who scored a dramatic last-gasp winner against Algeria to qualify for the second round, seemed to tire after the goal, and though they sent ball after ball into the Ghana box in the final minutes, they could find no late heroics at the Royal Bafokeng Stadium. All of Africa seemed to explode at the final whistle, and the youngest team in the tournament will continue to fly the continent's colours for one more round.