The 26-year-old joined United for £26m in 2007, but leaves Old Trafford on a free transfer after falling out of favour in recent years.
Anderson won four Premier League titles, the Champions League, two League Cups and the FIFA Club World Cup in eight seasons with the club.
He was a regular starter in his first four years under former boss Sir Alex Ferguson but a combination of serious injuries, and struggles with his weight, curtailed his playing time.
The Brazilian, who was loaned to Fiorentina last season, made just 70 Premier League starts for United during his time with the club.
This season he has started just one game under manager Louis van Gaal, the embarrassing Capital One Cup defeat at the hands of MK Dons last August.
After completing his move Anderson took to Instagram to say farewell to “the best club in the world”.
“Thank you so much to Manchester United It is truly the best club in the world, I love it so much and have enjoyed every year I have spent there,” he wrote.
“Thank you to all the team who work at United and especially all the boys, I have made some amazing friends, all of whom are great players and will continue to do great things.
“And one massive thank you to all of the fans, for your continuous love.. The best.”