The 18-year-old has decided to leave City as he believes he has not been given enough first-team opportunities.
City made a series of lucrative offers to keep the Spanish forward, but he has been convinced that he will get more playing time at the Santiago Bernabeu.
He has been told he will be a part of the first-team squad and will play in the Copa del Rey in the second half of the season.
Brahim will cost Madrid £15.5m up front, plus a series of bonuses, and he will earn £65,000-per-week.
Sources close to the player are optimistic that he will be given the opportunity to prove his ability in the coming months, before his future is assessed in the summer.
A loan move at that stage has not been ruled out, but he believes he also has a good chance of being named in the first-team squad next season.
It is also understood that the winger’s camp have discussed the possibility of Jose Mourinho taking over at Madrid at the end of the season, and what effect that may have on the youngster’s first-team prospects.
However, the current feeling is that the former Manchester United boss will not be returning to the Spanish capital in the near future.
City were desperate to keep hold of the former Malaga youngster, who joined the club as a 14-year-old, but were unable to convince him that he would play enough first-team football either this season or beyond.