The South African Football Association says on Friday that Bafana Bafana will face the five-time World Cup winner and 2014 host in Sao Paulo on Sept. 7.
The game also will likely be the first in charge for South Africa's new coach, who is expected to be announced at the end of this month.
SAFA chief executive Robin Petersen says South Africa, which hosted the first World Cup in Africa in 2010, has been working to organize the game for six months.
Brazil beat Bafana Bafana 1-0 in the last game between them, a Confederations Cup encounter in South Africa in 2009.