The France international, 29, follows fellow City outcasts Joe Hart and Wilfried Bony in leaving the club on Wednesday, on respective season-long loan agreements.
The Frenchman took to Twitter to send a message to the club's supporters.
"@ManCity it's been a pleasure thanks to everyone in the club and the fans for the 5 amazing years and wish you best of luck for the season," he wrote on the social networking platform.
Nasri, who missed out on France's Euro 2016 squad, made his first and only appearance of the season in City's 3-1 victory over West Ham United at the weekend.