Maicon put Brazil ahead early on before a floodflight failure stopped the first half of the semi-final for 14 minutes.
Diego Forlan equalised after the re-start only for Julio Baptista to head Brazil back in front before halftime. Substitute Sebastian Abreu pulled Uruguay level again midway through the second half.
With no extra time played in the tournament, both teams missed two penalties before Brazil won the shootout 5-4 after Diego Lugano's last effort for Uruguay was saved by Doni.
The game ended in an ugly scuffle after Brazil's celebrations appeared to provoke Uruguay as they repeated their penalty shootout win over the same opponents at the same stage of the previous tournament three years ago.
The game, played in sapping heat and humidity, got off to a cautious start but Brazil went ahead in the 13th minute after producing the first flowing move of the game.
A break down the right ended with Fabian Carini superbly saving Mineiro's shot only for Maicon to snap up the rebound.
Uruguay came back into the game after the blackout with Alvaro Recoba's inswinging free kicks and corners causing havoc in the Brazil defence.
SUPERB SAVE
Brazil goalkeeper Doni was forced to punch away three Recoba corners from under his crossbar and made a superb save to turn away Forlan's shot on the turn.
In the fourth minute of time added on for the floodlight failure, Doni failed to clear a Recoba cross and the ball fell to Forlan, who scored with a low shot from the edge of the penalty area.
But Brazil regained the lead five minutes later when Julio Baptista headed in following a free kick on the right.
In the second half, Brazil appeared happy to sit back on the lead but they paid when Abreu, who replaced Recoba at halftime, equalised in the 70th minute.
Jorge Fucile slipped the ball to Cristian Rodriguez on the left, his cross from the byline was headed on by Forlan to Abreu, who scrambled the ball in at the far post.
Forlan's first penalty for Uruguay in the shootout was saved by Doni while Alex Afonso crashed Brazil's fourth effort against the post.
As the shootout went to sudden death, Fernando hit the post for Brazil and Pablo Garcia, needing to convert to send Uruguay through, did the same.
Gilberto then scored for Brazil and Lugano missed.
More from rediff