Hulk netted the winner with a left-foot shot from inside the area in the 75th minute, but it was not enough to please the more than 50 000 fans who went to Morumbi stadium on Independence Day.
Brazil struggled to create significant scoring opportunities and was not able to play the attacking soccer that fans had hoped to see, allowing South Africa to threaten and forcing goalkeeper Diego Alves to make difficult saves.
"The fans should have supported more," Hulk said. "If they had supported us from the beginning I think the result would've been different."
The booing began in the first half and at times Brazilian fans even applauded South Africa. Menezes was booed nearly every time he got off the bench to instruct his players, and Brazil star Neymar also heard from the fans in Sao Paulo, who traditionally have been tough on their national team.
"We expected more support from the fans but unfortunately it didn't happen," Brazil defender Dede said. "We know we have to do better, but we have to be pleased with the win."
Brazil controlled possession but the goal came only when substitute Hulk, who recently transferred from FC Porto to Zenit St Petersburg, sent a through ball to defender David Luiz inside the area. Luiz's shot on goal was saved and the rebound came back to Hulk, who cleared a defender and fired a firm left-footer into the net.
South Africa had a few scoring chances near the end but couldn't capitalise on them.
South African goalkeeper Itumelenge Khune made difficult saves after a header by Brazil defender Dede in the 17th minute and shots by Neymar in the 43rd and 70th minutes, but Brazil's Alves also had to work hard to keep the Africans from scoring.
Some of his best saves came on shots by Siboniso Gaxa in the 12th and Siphiwe in the 81st. South Africa threatened with long-range shots in the second half, including one by Bernard Parker that just sailed over the crossbar in the 58th.
The lacklustre performance will likely increase the calls for the resignation of Menezes, who is trying to prepare Brazil's squad for next year's Confederations Cup and the 2014 World Cup at home.
The team was revamped after the 2010 World Cup and is led by several young promising stars, including Neymar, Oscar, Leandro Damiao and Lucas. Some of the veterans include Barcelona's Daniel Alves and Paris Saint-Germain's Thiago Silva.
Most of the players summoned for Friday's friendly were in the Olympic squad which won the silver medal at the London Games. Brazil was the heavy favourite to win the under-23 tournament but lost the final to Mexico.
The team's failure to win the Olympics prompted increased calls for a change in command. Menezes had already been under pressure by fans and local media after a series of disappointing results in friendlies.
Brazilian football federation president Jose Maria Marin said the Olympics would play an important role on whether Menezes would stay, but said after the tournament that it was not time to make a change.
Just four days after the disappointing 2-1 loss to Mexico in Wembley, Brazil beat Sweden 3-0 in a friendly in Stockholm. It will now play China on Monday in the northeast city of Recife.
The five-time world champions are not playing in South American World Cup qualifiers because they have already secured their place in the 2014 tournament as hosts.
Brazil will play the Superclassic of the Americas, a home-and-away series against rival Argentina, on September 19 and October 3, and then will face Japan in a friendly in Poland on October 16.
Brazil are 12th in FIFA's latest rankings. South Africa, 56th in the rankings, drew Ethiopia and Botswana in Group A of African World Cup qualifying.