Hakimi's contract at the Bernabeu expires in June 2022; Moroccan international has made 32 league appearances on loan at Borussia Dortmund this season.
The two clubs have reached an agreement on a deal in principle worth £36.3m (€40m), with the right-back open to a move to northern Italy.
Borussia Dortmund were keen on signing Hakimi permanently, and the defender has also attracted interest from Bayern Munich and Manchester City.
The 21-year-old joined Borussia Dortmund in 2018 on a two-year loan and scored nine goals for the Bundesliga side this season.
Dortmund last week announced the signing of full-back Thomas Meunier when his Paris Saint-Germain contract expires on June 30.
Birmingham midfielder Jude Bellingham, 16, also continues to be linked with a move to Signal Iduna Park, with Dortmund interested in the highly-rated English teenager, along with Manchester United.
Inter Milan's sporting director Piero Ausilio told Sky in Italy last month that the club are eager to extend Alexis Sanchez's loan from Manchester United.
Ausilio has also stated that their striker Lautaro Martinez will only depart the club this summer is if his £99.7m (€111m) release clause is met, while Mauro Icardi has moved to Paris Saint-Germain on a permanent deal.
Antonio Conte's side are currently third in Serie A, eight points behind league leaders Juventus, with 11 matches still to play.
Meanwhile, another player who could yet depart Real Madrid this summer is James Rodriguez, with the Columbia international winger having struggled for game-time at the Bernabeu after the conclusion his two-year spell at Bayern Munich.
The 28-year-old has suggested that his next move will be to a club that allows him to show his full ability on the pitch.