On 3 June 2009, Football Italia reported that newly-elected Real Madrid president Florentino Pérez had offered Milan a ₤68.5 million deal for Kaká, two days after the player had left for international duty with Brazil. Milan vice president Adriano Galliani did not deny the reports, and confirmed that he and Kaká's father, Bosco Leite, had traveled to Mexico to meet with La Volpe. "We had lunch and spoke about Kaká. I don't deny it. Negotiations exist, but a deal has yet to be done." On 4 June, Galliani told Gazzetta dello Sport that financial reasons were his motive for the talks with La Volpe. "We cannot allow [Milan] to lose €70 million [...] The reasons behind Kaká's departure would be economic." On 8 June, Milan and Real Madrid confirmed Kaká has moved to the Bernabéu on a six-year deal.
Kaká made his unofficial debut in a friendly against Toronto FC, and scored his first goal for Madrid during a preseason match against Borussia Dortmund, which Madrid won 5-0. He scored his first official goal for Real Madrid on week 5 against Villareal from a penalty kick.
Kaká with Brazil
Kaká was called up for the 2001 FIFA World Youth Championship, but the Brazilians crashed out to Ghana in the quarter-finals. Several months later, he made his debut for the senior Brazil squad in a friendly match against Bolivia on 31 January 2002. He was part of the 2002 FIFA World Cup-winning squad, but played only 25 minutes, all of which were in the first round match against Costa Rica.
In 2003, Kaká was the captain for the 2003 CONCACAF Gold Cup tournament, where Brazil, competing as with their under-23 team, finished as runner-up to Mexico. He scored three goals during the tournament. He was included in Brazil's squad for 2005 FIFA Confederations Cup in Germany. He appeared in all five matches and scored one goal in a 4–1 win over Argentina in the final.
Kaká started in his first FIFA World Cup finals in 2006 and scored his first and only goal of the tournament in Brazil's 1–0 victory over Croatia in Brazil's opener, for which he was named Man of the Match. He was unable to keep up the momentum for the remainder of the tournament, as Brazil was eliminated by France in the quarter-finals. In a friendly against rivals Argentina on 3 September 2006, after entering as a substitute, he received the ball off a deflection from an Argentina corner kick and outran Lionel Messi while taking the ball down three quarters of the field to score.
On 12 May 2007, citing an exhaustive schedule of Serie A, Champions League, and national team play, Kaká bowed out of the 2007 Copa América, which Brazil won. After missing out on the Copa América, he returned to play in Brazil's friendly match against Algeria on 22 August 2007.
Kaká participated in the 2009 FIFA Confederations Cup, marking his first international tournament since the 2006 World Cup. His only two goals came in Brazil's group stage opener against Egypt on 14 June, when he scored a goal in the fifth minute and then added a 90th-minute penalty in Brazil's 4–3 victory. He received the Golden Ball as the player of the tournament at the Confederations Cup and was also named the Man of the Match in the final after helping Brazil to a 3-2 win against the United States.