McChrystal, 55, had been widely expected to retire after he and his aides enraged the White House by disparaging the president and other top civilian advisers in an article for Rolling Stone magazine. He was fired on Wednesday.
Obama said McChrystal's dismissal was needed to safeguard the unity of the war effort.
"McChrystal informed the Army today that he intends to retire," an Army spokesman said.
McChrystal has yet to submit formal paperwork so it is unclear when his retirement will take effect, he added.
Obama has tapped General David Petraeus, McChrystal's boss and the architect of the Iraq war turnaround, to take over the troubled Afghan command. A Senate hearing on Petraeus's nomination is scheduled for Tuesday.
Aides have described the president as furious about McChrystal's contemptuous remarks in the article, entitled "The Runaway General."
In the piece, McChrystal himself made belittling remarks about Vice President Joe Biden and the U.S. special envoy to Afghanistan and Pakistan, Richard Holbrooke.
His aides were quoted as calling national security adviser Jim Jones a "clown" and saying Obama seemed intimidated and disengaged at an early meeting with McChrystal.
McChrystal graduated from the U.S. Military Academy at West Point in 1976 and was commissioned a second lieutenant in the Army, where he rose through the ranks over the next 34 years. (Source)