Parts of neighbouring Paraguay, which also receives power from the Itaipu dam, were also affected.
|Police across Brazil were put on alert amid fears of a crime wave [Reuters]
The huge dam straddles the border between Paraguay and Brazil.
The power cut first hit at about 10:20pm local time (1220GMT Wednesday), snarling streets in Rio after traffic lights stopped working.
Subway rail services were also knocked out in both Rio and Sao Paulo.
Edson Lobao, Brazil's mines and energy minister, said strong storms had uprooted trees near the dam just before it went offline and could be to blame for the sudden outage.
The blackouts came three days after a report on US TV network CBS said that several past power outages in Brazil had been caused by hackers attacking electricity control and distribution systems.
Maria Elena Romero, a journalist in Sao Paulo, told Al Jazeera: "There are also reports of Paraguay being affected by the same power outages.
"The minister of the energy of Brazil has confirmed that the outage was caused by the failure of the Itaipu hydroelectric dam. The minister didn't want to speculate on the causes for this failure, but local media say weather conditions could be the reason."