Brazil international, Danilo has arrived the Etihad Stadium in a five-year deal. The 26-year-old is expected to join the Citizens on their pre-season tour of the United States.
Danilo can play in both full-back roles as well as in midfield, and is City’s fourth major signing of the summer.
“There was interest from other clubs, but it has always been my ambition to play for Pep Guardiola,” he said.
His arrival takes City’s summer spending to almost £150m, following the recruitment of England international Kyle Walker (£45m), Portugal midfielder Bernardo Silva (£43m) and Brazilian goalkeeper Ederson Moraes (£35m).
Danilo’s move is still subject to work permit. This implies that he is unlikely to make his debut when City face Real Madrid on Wednesday in Los Angeles.
The former Santos player joined Real Madrid in 2015 from Porto but started just 17 La Liga games last season.
In two years at the Bernabeu, he won La Liga, two Champions Leagues, the Uefa Super Cup and the Fifa Club World Cup.
“Danilo is a fine player who offers great versatility,” said City director of football Txiki Begiristain.
“He can operate in several different roles in both defense and midfield, increasing Pep’s options ahead of the new season.”
Meanwhile, City and Pep Guardiola are still in the hunt for new additions. Monaco’s Benjamin Mendy is the new target as Pep has long identified him Mendy as the ideal man he wants on the left side of his defense.
The French champions rejected City’s £44.5m bid last week and held out for the same as what City paid Tottenham for Kyle Walker. Last week City finally signed Walker, after months of negotiations, for a fee of £50m that could rise to £53m including add-ons.
Monaco have proven to be tough negotiators so far during the transfer window, getting a £40m fee from Chelsea for Tiemoue Bakayoko and an initial £43m from City for Bernardo Silva.
The potential arrival of Mendy and already confirmed Danilo will push City’s summer spending beyond £200m. Now, that’s a profound show of intent by the owners of Manchester’s blue side!