Known as a ''tough dog'' for his training methods, the 54-year-old Ramalho succeeds Carlos Dunga, who was fired after Brazil's disappointing quarter-final exit from the 2010 World Cup in South Africa.
Ramalho still has to get approval from the Rio-based league leaders Fluminense to take over the "Selecao" but Brazilian media reports said the club was not expected to try to block his move.
He faces the daunting task of preparing the Brazilian team in hosting the 2014 World Cup in Brazil, where the pressure on the Selecao winning their sixth world title will be extreme.
"He knows our project and has agreed to it and wants to be the national trainer," CBF president Ricardo Teixeira said on Brazilian television. Ramalho has had a lot of success in the past and must now "renew (the Selecao) step by step".
Ramalho was voted the best coach in the Brazilian football league for four straight years 2005-2008. Reports said that it was Teixeira himself who proposed him for the national trainer post.
He is known, like Dunga, to be a tough disciplinarian and does not adhere to the "Jogo Bonito" - beautiful game - school.
"Victories are what is important," he once said. "Those who want to see a show should head for the theatre."
Once confirmed as coach, Ramalho's first decision must come by Monday when he names the Selecao squad for a friendly match against the US Aug 10 in New Jersey.
Ramalho was a dangerous striker in the 1970s and 1980s at Sao Paulo and with Puebla in Mexico. For a while his talent drew comparisons with the legendary Pele.