The Englishman took charge of his final match against Arsenal on Thursday, which ended in a 3-2 victory.
Carrick was expected to stay at the club under new interim manager Ralf Rangnick, but the former United midfielder has announced his departure straight after the win over Arsenal.
He said: "My time at this great club will always rank as the best years of my career. When I first signed over 15 years ago, I never in my wildest dreams could have imagined winning so many trophies and I will certainly never forget the fantastic memories both as a player and as a member of the coaching team.
"However, after a lot of thought and deliberation, I have decided that now is the right time for me to leave the club.
"I want to place on record my thanks to all of the players and a special mention goes to the backroom staff, working long hours with such a great group of people has been a real pleasure and I have made some long-lasting friendships.
"I am, and will always be, a Manchester United fan and will come to as many matches as possible. I would like to wish Ralf, the staff, the players and the fans all the best for the future and I look forward to being in the stands and supporting the boys as a fan."
Need a VPN? Or seeking to switch? Then support Tribal Football by clicking here to sign up with our official partners NordVPN. Not only will you receive the best VPN experience, but also great discounts by signing up via Tribal Football. Thanks for your support!