Ronaldinho, one of Brazil's three overage players, scored the third goal of the match in the 55th minute and pushed the lead to four goals on a penalty kick in the 61st.Midfielder Anderson and 18-year-old striker Alexandre Pato scored the first two goals for Brazil, one of the favorites to win the tournament. Rafael Sobis had the final goal in the 90th minute for the Brazilians.
Brazil is first in Group C with two wins in two matches and clinched a berth in the knockout stage of the tournament.
In Sunday's other early matches, Argentina defeated Australia 1-0 in Group A, Nigeria held on for a 2-1 win over Japan in Group B and Cameron edged Honduras 1-0 in Group D.
Anderson got Brazil off to a great start with a goal in the fourth minute, and Pato doubled the lead before halftime with a goal in the 34th.
Then Ronaldinho, Brazil's captain and one of the top players in the world, took over with a pair of goals during a six-minute stretch.
Sobis wrapped up the convincing victory in the final seconds.
In Shanghai, Argentina got a goal from Ezequiel Lavezzi in the 77th minute to edge Australia. Argentina, the defending gold medalist and the other favorite in the tournament, also has won its first two games, leads its group and sealed a berth in the next round.
In Tianjin, Victor Obinna and Victor Anichebe scored to give Nigeria a two-goal lead and it held on to edge Japan. After Anichebe scored in the 74th minute to give Nigeria a 2-0 edge, Yohei Toyoda scored in the 79th for Japan.
In Qinhuangdao, Stephane Mbia scored the game's only goal in the 74th minute to lead Cameroon over Honduras.
Later Sunday, the United States plays the Netherlands, Serbia plays the Ivory Coast, Belgium plays China and Italy plays South Korea.
All 16 teams wrap up the group stage on Wednesday.