The midfielder moves to Anderlecht after coming off contract at West Ham. It's understood Nasri has penned an initial 12 month deal.
Nasri said, "I received a number of great offers, but in the end I chose RSC Anderlecht with a great deal of conviction.
"Vincent Kompany was my teammate at City between 2011 and 2017. I know him through and through and know what project he has in mind with Anderlecht. Together with him and the whole team I want to do everything to make this a success."
Anderlecht chairman Marc Coucke also stated: "At Anderlecht, we focus on youth, which we want to give plenty of opportunities to develop. But they can only succeed if you also surround them with experience at training and on the pitch.
"Nasri is a real topper who will give these boys experience and who can also effectively lift them to a higher level by continuously training and playing with the youngsters. We are proud that a player of his level has chosen Anderlecht."