The 71-year-old is the most successful manager in the history of English football, having won 38 trophies - including 13 Premier League titles - since taking over from Ron Atkinson in November 1986.
Ferguson will say his goodbyes to the Old Trafford crowd after Sunday’s home clash against Swansea before taking on a role as an ambassador on the United board of directors.
In a statement on United’s official website, Ferguson said: “The decision to retire is one that I have thought a great deal about and one that I have not taken lightly. It is the right time.
“It was important to me to leave an organization in the strongest possible shape and I believe I have done so. The quality of this league winning squad, and the balance of ages within it, bodes well for continued success at the highest level whilst the structure of the youth setup will ensure that the long-term future of the club remains a bright one.
“Our training facilities are amongst the finest in global sport and our home Old Trafford is rightfully regarded as one of the leading venues in the world.
“Going forward, I am delighted to take on the roles of both Director and Ambassador for the club. With these activities, along with my many other interests, I am looking forward to the future.
“I must pay tribute to my family, their love and support has been essential. My wife Cathy has been the key figure throughout my career, providing a bedrock of both stability and encouragement. Words are not enough to express what this has meant to me.
“As for my players and staff, past and present, I would like to thank them all for a staggering level of professional conduct and dedication that has helped to deliver so many memorable triumphs. Without their contribution the history of this great club would not be as rich.
“In my early years, the backing of the board, and Sir Bobby Charlton in particular, gave me the confidence and time to build a football club, rather than just a football team.
“Over the past decade, the Glazer family have provided me with the platform to manage Manchester United to the best of my ability and I have been extremely fortunate to have worked with a talented and trustworthy Chief Executive in David Gill. I am truly grateful to all of them.
“To the fans, thank you. The support you have provided over the years has been truly humbling. It has been an honor and an enormous privilege to have had the opportunity to lead your club and I have treasured my time as manager of Manchester United.”
Ferguson scheduled a meeting to break the news to staff at the club’s Carrington training ground and will then hold an interview with United’s in-house television station, MUTV.
Everton manager David Moyes has been installed as the bookmakers’ favorite to succeed the Scot while Real Madrid boss Jose Mourinho is also among the favorites to take over at Old Trafford.
The announcement of Ferguson’s decision to retire came after intense speculation following a golf match between United players and coaches at Dunham Massey on Tuesday.
Ferguson has long been planning for his succession and has consistently cited his health as the decisive factor in the timing of his retirement. He had a pacemaker fitted in 2004 and United confirmed last week that he would undergo hip surgery in August.
David Gill’s decision to stand down as chief executive this summer saw Ferguson lose a close ally within the club and there had been suggestions that he came close to quitting at the end of last season after losing out on the Premier League title to Manchester City.
Ferguson previously expressed his regret over announcing his retirement before the end of the 2001-02, which he felt led to poor on-pitch performances and resulted in him coming back after he had a change of heart.