Matheus Fernandes will join Barcelona over the summer for a fee of 7 million euros plus 3 million in add on and will sign a five-year contract.
Defending Brazilian Serie A champions Palmeiras have sacked coach Eduardo Baptista, less than five months after his appointment.
The announcement follows the team's 2-3 away loss to Bolivia's Jorge Wilstermann in their Copa Libertadores group match on Wednesday, reports Xinhua news agency.
"Palmeiras are thankful for the services given by (Baptista)… and wish him success for the rest of his career," the Sao Paulo outfit said on their official website.
Baptista led Palmeiras to 14 wins, four losses and five defeats.
Despite Wednesday's result, Palmeiras lead their Copa Libertadores group with 10 points from five matches.
Club president Mauricio Galio said he expected to name a new coach within days.