The striker decided to end his two-year spell with Seville by signing a five-year contract with Real and will be presented at the Bernabeu on Monday, providing he passes a medical.
Madrid have agreed to pay an initial £13.8m, which could rise to £17.2m depending on performance-related clauses.
Arsenal were thought to have made a similar bid for the 23-year-old but Baptista rejected the chance of moving to the Premiership.
One factor in his decision was his wish to obtain an EU passport, which playing a third season in Spain would allow him to acquire. But Baptista said that ambition was also a factor in the move. "I couldn't let this opportunity escape me," he said from Shanghai, where he is on tour with Seville.
Baptista was signed as a defensive midfielder but quickly showed his goalscoring ability and ended the past two seasons as Seville's top scorer.
He has scored almost 40 goals over two seasons, helping Seville qualify for the Uefa Cup each year, although the uncertainty surrounding his future had soured his relationship with the club in recent weeks.
He was booed on his last appearance for Seville in Spain, despite scoring two goals in a friendly, although he has no hard feelings. "I am leaving a great club where I have truly become a footballer. I hope and ask for the fans to understand me, because I am both young and a professional. I have Seville in my heart and I am leaving with the hope of returning one day."
Baptista's last league goal for Seville was a late equaliser in the 2-2 draw against Real Madrid in their meeting in the Sanchez Pizjuan stadium three weeks from the end of the season, a result that left Barcelona, who played Levante directly after the Madrid game finished, needing only a draw, which they achieved, to clinch the league title.
He becomes Real's third summer signing, joining the Uruguayans Pablo Garcia and Carlos Diogo, while the club are also hoping to close the deal for Robinho, another Brazilian forward, from Santos.
Should that signing materialise then Madrid would be able to call on strikers of the quality of Baptista, Ronaldo, Raul, Robinho and Michael Owen, leaving England's top striker with a tough battle to make the starting line-up or even the bench in the new season.Reuse content