Towards the end of the 2007–08 season, Van der Vaart was linked to a move to several clubs including Atlético Madrid and Juventus.
Atlético made a €15 million bid for the Dutchman, which Hamburg rejected, and in the end, it was their cross-town rivals who got Van der Vaart's signature instead.

On 4 August 2008, Real Madrid and Hamburg reached a €13 million agreement for Van der Vaart's transfer, Real Madrid's only summer signing.
He signed a five-year contract for an undisclosed amount.
Van der Vaart debuted in a 2–1 pre-season win four days later, against Colombian side Independiente Santa Fé, where he scored the equalising goal and provided an assist for the winner.

He changed his squad number from 19 to his favored number 23 after teammate Wesley Sneijder took number 10 following Robinho's departure to Manchester City on 31 August.
He marked his league debut for Real Madrid with a strike against Numancia in a 4–3 victory.
On 24 September, he scored his first career hat-trick in a 7–1 thrashing of Sporting de Gijón.
In October
2008, Van der Vaart was one of the many La Liga players to be nominated for the Ballon d'Or, but the award eventually went to Manchester United forward and future teammate Cristiano Ronaldo.
For the latter part of the 2008–09 season, Van der Vaart was mostly utilized as an impact substitute by coach Juande Ramos, which led to speculations of a fall-out between coach and player.
Despite transfer rumors linking him with Arsenal, Chelsea and Liverpool, he denied having any links with the English clubs.

During the summer of 2009, it was speculated that van der Vaart would leave Real Madrid after being told he was not going to be part of the team's plans by coach Manuel Pellegrini.
His number 23 jersey was even handed to Esteban Granero in preseason, leaving him without a squad number.
Towards the end of the summer transfer window, however, he eventually came to an agreement with Real Madrid to stay with the club after the squad size had been reduced to 25 players as Dutch compatriots Wesley Sneijder, Arjen Robben and Klaas-Jan Huntelaar were forced to leave the club.
Van der Vaart was handed his original number 23 jersey while Granero was given number 24.
After a wait of four games, Van der Vaart was finally included in Pellegrini's squad list to face Villarreal on 23 September.
An injury to Kaká gave Van der Vaart a chance to establish himself as a key player for Los Blancos again.
On 20 December, he scored two goals in a 6–0 win against Real Zaragoza.
He scored his last goal for Real Madrid against Málaga on 16 May 2010.
Van der Vaart stated his desire to stay at Real Madrid, at least until the end of his contract.
Towards the end of the 2007–08 season, Van der Vaart was linked to a move to several clubs including Atlético Madrid and Juventus. Atlético made a €15 million bid for the Dutchman, which Hamburg rejected, and in the end, it was their cross-town rivals who got Van der Vaart's signature instead.
On 4 August 2008, Real Madrid and Hamburg reached a €13 million agreement for Van der Vaart's transfer, Real Madrid's only summer signing. He signed a five-year contract for an undisclosed amount. Van der Vaart debuted in a 2–1 pre-season win four days later, against Colombian side Independiente Santa Fé, where he scored the equalising goal and provided an assist for the winner.
He changed his squad number from 19 to his favored number 23 after teammate Wesley Sneijder took number 10 following Robinho's departure to Manchester City on 31 August. He marked his league debut for Real Madrid with a strike against Numancia in a 4–3 victory. On 24 September, he scored his first career hat-trick in a 7–1 thrashing of Sporting de Gijón. In October
2008, Van der Vaart was one of the many La Liga players to be nominated for the Ballon d'Or, but the award eventually went to Manchester United forward and future teammate Cristiano Ronaldo. For the latter part of the 2008–09 season, Van der Vaart was mostly utilized as an impact substitute by coach Juande Ramos, which led to speculations of a fall-out between coach and player. Despite transfer rumors linking him with Arsenal, Chelsea and Liverpool, he denied having any links with the English clubs.
During the summer of 2009, it was speculated that van der Vaart would leave Real Madrid after being told he was not going to be part of the team's plans by coach Manuel Pellegrini. His number 23 jersey was even handed to Esteban Granero in preseason, leaving him without a squad number. Towards the end of the summer transfer window, however, he eventually came to an agreement with Real Madrid to stay with the club after the squad size had been reduced to 25 players as Dutch compatriots Wesley Sneijder, Arjen Robben and Klaas-Jan Huntelaar were forced to leave the club. Van der Vaart was handed his original number 23 jersey while Granero was given number 24. After a wait of four games, Van der Vaart was finally included in Pellegrini's squad list to face Villarreal on 23 September. An injury to Kaká gave Van der Vaart a chance to establish himself as a key player for Los Blancos again. On 20 December, he scored two goals in a 6–0 win against Real Zaragoza. He scored his last goal for Real Madrid against Málaga on 16 May 2010. Van der Vaart stated his desire to stay at Real Madrid, at least until the end of his contract.
Rafael van der Vaart