He will be replaced by Gen David Petraeus, who led the "surge" in Iraq.
Mr Obama insisted it was "a change in personnel but not a change in policy".
In a profile in Rolling Stone magazine, Gen McChrystal and aides were quoted as making disparaging remarks about Mr Obama and senior colleagues.
Gen McChrystal himself described the period last year when President Obama was slowly moving towards the approval of the deployment of thousands more US soldiers to Afghanistan as "painful".
And referring to a key Oval Office meeting between Mr Obama and Gen McChrystal a year ago, an aide of Gen McChrystal said the president "didn't seem very engaged. The boss [Gen McChrystal] was pretty disappointed".
Mr Obama said he had made the decision to replace Gen McChrystal "with considerable regret" but added that he had failed to "meet the standard that should be set by a commanding general".
Add new comment