Hakimi, 21, has developed into one of the finest talents in Europe after spending the last two seasons on loan in the Bundesliga with Borussia Dortmund.
While manager Zinedine Zidane, who gave him his Real debut, holds the defender in high regard, Hakimi's wish to earn regular first-team football has been the biggest contributing factor to the surprise move.
The deal has not included a buy-back clause with a five-year contract signed for the Atlas Lions star, who was identified as Antonio Conte's primary target for his right-wing back role.
"The club wishes to thank Achraf for his many years of dedication, professionalism and exemplary conduct since he joined our academy in 2006," Real said in an official statement. "We wish him all the very best in this new chapter."
The technically gifted defender has scored nine goals and registered 10 assists in 45 games across all competitions for Dortmund during the 2019/20 campaign.