Obama and McChrystal met for about 30 minutes before McChrystal was seen leaving the White House.
The timing of McChrystal's resignation couldn't be worse, with the war in Afghanistan entering a critical phase, and June is on track to becoming one of the deadliest months for U.S. and international forces in the nearly nine-year Afghan war.
"The article in which he and his team appeared showed poor judgment," Obama said on Tuesday.
The president said he did not make the decision to accept McChrystal's resignation over any disagreement in policy or "out of any sense of personal insult." Flanked by Vice President Joe Biden, Defense Secretary Robert Gates and Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, in the Rose Garden, he said: "I believe it is the right decision for our national security."
As Obama was speaking, McChrystal released a statement that read: "This morning the President accepted my resignation as Commander of U.S. and NATO Coalition Forces in Afghanistan. I strongly support the President's strategy in Afghanistan and am deeply committed to our coalition forces, our partner nations, and the Afghan people. It was out of respect for this commitment -- and a desire to see the mission succeed -- that I tendered my resignation. It has been my privilege and honor to lead our nation's finest."
Military leaders rarely challenge their commanders in chief publicly. When they do, consequences tend to be more severe than a scolding.
Obama hit several gracious notes about McChrystal and his service, saying that he made the decision to sack him "with considerable regret." And yet, said he said that the job in Afghanistan cannot be done now under McChrystal's leadership, asserting that the critical remarks from the general and his inner circle in the Rolling Stone magazine article displayed conduct that doesn't live up to the necessary standards for a command-level officer.
Highlights from the Rolling Stone article
The Rolling Stone quoted McChyrstal's aides saying McChrystal thought Obama looked "uncomfortable and intimidated in a roomful of military brass."
After McChyrstal's first one-on-one meeting with Obama, the magazine quotes an adviser to McChrystal as saying, "Obama clearly didn't know anything about him, who he was. Here's the guy who's going to run his (expletive) war, but he didnt' seem very engaged. The Boss was pretty disappointed."
On Vice President Joe Biden, McChyrstal joked, "Who's that?" and an aide added, "Biden? Did you say Bite Me?"
On National Security Advisor Jim Jones, an aide called him a "clown."
The Associated Press contributed to this story.