Becks will sign a four-year contract with the Spanish club after they agreed a £24.5m fee with the Premiership champions.
The England captain will officially complete the transfer to the Bernabeu in early July.
Lure of Champions League
"I recognise that this is an amazing opportunity for me at this stage in my career," he explained.
"I know that I will always regret it later in life if I had turned down the chance to play at another great club like Real Madrid.
Of the club he's leaving he said: "I wish them the best of luck."
Reds boss Alex Ferguson said: "I've known David since he was 11 years of age, and it's been a pleasure to see him grow and develop into the player he has become."
Becks is on a promotional tour of Japan.