The 19-year-old joins the Premier League champions in a deal which also sees Montenegro international Stefan Savic moving in the opposite direction.
Nastasic is the fourth player to join City on a hectic final day of the transfer window. Maicon, Scott Sinclair and Richard Wright have also signed for the champions.
Nastasic will arrive as a straight swap for Savic, who has struggled to make an impression at the Etihad Stadium since his £6million signing from Partizan Belgrade last year.
He joins captain Vincent Kompany, England international Joleon Lescott and Kolo Toure among manager Roberto Mancini's central defensive options.
When speaking about his interest in the player, Mancini said: "Nastasic will be one of the top players for a long time."
Savic, 21, made 11 appearances for the club last season but did not look comfortable in his first taste of the English game.