The five-time world champions will face the African heavyweights at Fulham's Craven Cottage on September 5, the CBF announced.
Brazil had originally arranged a September 6 date with Egypt which was cancelled for security reasons.
World Cup quarter-finalists Ghana were to have met Nigeria at Watford near London last week but that match was called off following widespread rioting in the British capital.
Brazil coach Mano Menezes was on Thursday set to unveil his squad for the rearranged match.
Since their Copa America quarter-final loss to Paraguay, 2014 World Cup hosts Brazil have followed up with a friendly loss to Germany.
Now, Menezes is trying to establish a winning formula as the five-times world champions prepare for further friendlies later in the year against Argentina, Costa Rica, Mexico and Gabon.
Brazil to play Ghana in friendly in London
Advertisement