The 22-year-old's future appeared to be up in the air after injury and disciplinary issues, but he has returned to the United first team in style.
Anderson started just 10 Barclays Premier League games last season and suffered a cruciate knee ligament problem in February.
Braziliant: Anderson (left) impressed in the victory over Arsenal this week
He hit the headlines again this summer after being involved in a serious car crash in Portugal, but has been attracting attention for the right reason in recent weeks.
'We are delighted Anderson has signed a new contract,' said Ferguson. 'Andersonhas developed tremendously since joining the club and he has fantastic potential at only 22 years of age, he is going to be a really top player.'
Watchful eye: Ferguson gestures to Anderson before easing the Brazilian back into first-team action at Manchester United this season
Anderson joined United in a big-money move from Porto in June 2007, signing a five-year contract, but the new deal extends his stay to 2015.
Clubs were lining up to prise him from Old Trafford in the last two transfer windows, but Anderson said: 'This is the best club to be at and I would like to thank everyone for the great support I have received over the years.
'I am looking forward to winning many more trophies with this club and I am so pleased to have signed a new contract.'
Ferdinand claims win over Arsenal has given United the edge in title raceMan United must move for Coentrao as AC Milan prepare to seal the dealJoy division: Sportsmail's fans pick which team they would pay to watchMANCHESTER UNITED FC