United confirmed the news on their website on Wednesday morning.
"The decision to retire is one that I have thought a great deal about and one that I have not taken lightly," said Ferguson.
"It is the right time."
Ferguson's last game in charge will be at West Brom on May 19 and he will join the club's football board.
"It was important to me to leave an organisation in the strongest possible shape and I believe I have done so," he said.
"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 set-up will ensure that the long-term future of the club remains a bright one."
- Sports & Recreation
- Society & Culture