The Spaniard had been heavily linked with a return to his homeland in recent weeks, with his contract at the Etihad Stadium due to expire in the summer, and the move has now been confirmed, with the youngster signing a deal taking him through until the summer of 2025.
Díaz will undergo his medical with 'Los Blancos' on Monday morning, before being presented to the Real Madrid fans at 13:30 at the Estadio Santiago Bernabeu.
The 19-year-old becomes Madrid's first signing of the window, with Santiago Solari in desperate need of reinforcements after watching his side crash to a shock 2-0 defeat to Real Sociedad in their first game of 2019.
The Spain youth international is believed to have cost Madrid in the region of €15m, though that fee could rise as high as €20m with add-ons.
Despite City boss Pep Guardiola being a huge fan of his talents and Díaz even being represented by Media Base Sports, the management company headed up by Pere Guardiola (Pep's brother), Brahim is believed to have grown frustrated with his lack of opportunities at the Etihad and has instead opted for a move back to his homeland.
A host of other European heavyweights are known to have considered a move for the classy playmaker, with Juventus understood to have been hugely keen, but in the end he only had eyes for the European champions.
January 6, 2019
Brahim encapsulates the sort of player that Real Madrid president Florentino Perez wants to bring to the club, with the combination of his contract situation and status as one of Spanish football's hottest young properties making him a unique opportunity.
The move is the latest example of City's inability to keep their most talented young players at the club, following Jadon Sancho's departure for Borussia Dortmund.
Díaz leaves City having made 15 first-team appearances for the reigning Premier League champions and scoring twice since making his debut against Swansea in the EFL Cup back in September 2016.
July 27, 2017