But he said McChrystal's remarks in the magazine article were unbecoming of a commanding general and "undermines the civilian control of the military that is at the core of our democratic system".
McChrystal, who said it had been a "privilege and honour" to have served as the US and Nato commander in Afghanistan for a year, called his magazine comments "a mistake reflecting poor judgment".
He added that he strongly supported the president's strategy in Afghanistan, a strategy Obama made clear the change in command would not significantly alter.
Obama has nominated General David Petraeus, the head of US Central Command who had been supervising McChrystal, to take command of the war in Afghanistan.
The 55-year-old McChrystal has been a military officer for 34 years.