The abrupt change of command comes amid a build-up in the US military presence in Afghanistan as Barack Obama’s administration seeks to quash the growing Taliban insurgency.
Robert Gates, defence secretary, refused to be drawn on the reasons for replacing Gen McKiernan but said it was time for a “new approach” to the eight-year-old conflict.
“Nothing went wrong, and there was nothing specific,” he told reporters. “The focus here is simply on getting fresh thinking, fresh eyes on the problem.”
The White House said in a statement: “The president agreed with the recommendation that the implementation of a new strategy in Afghanistan called for new military leadership. This change in no way diminishes the president’s deep respect for Gen McKiernan and his decades of public service.”
Some critics said he was too focused on traditional combat operations rather than the more complex counter-insurgency strategy ordered by Mr Obama.
The shake-up comes weeks after the US announced a new joint strategy for dealing with the threat from the Taliban and other extremist groups in Afghanistan and Pakistan.
“This is the right time to make the change, when we are at the beginning of the implementation of a new strategy,” said Mr Gates.
Gen McChrystal’s background is in planning and overseeing the most sensitive of US special operations forces, including counter-terrorism units such as the army’s Delta Force. From September 2003 until August 2008, he led the Pentagon’s Joint Special Operations Command, which played a crucial role in tackling the insurgency in Iraq.
Diplomats said Gen McChrystal’s appointment reflects a belief that the war in Afghanistan has grown so complex that it needs a commander drawn from the military’s unconventional warfare branch rather than a conventional army man such as Gen McKiernan.
His appointment comes as the US prepares a significant build-up in the number of troops it is deploying in Afghanistan, mainly in the south and east of the country. Mr Obama is more than doubling the number of US troops to 68,000 by the end of the year. There were about 32,000 troops in Afghanistan at the end of December.
Lieutenant General David Rodriguez, who is the defence secretary’s top military aide, will serve as Gen McChrystal’s deputy, a new position, Mr Gates said.
Gen McChrystal and Lt Gen Rodriguez will be “a team,” he said. “Each brings special skills,” and it is “their combined skill set that gives us fresh opportunities looking forward.”
Gen McKiernan will remain in command until the new leaders are confirmed by the Senate.
Mr Obama’s plan for Afghanistan and Pakistan calls for a military push to reverse deteriorating security, a surge of civilian aid and development assistance, and possible reconciliation between the Kabul government and some members of the Taliban.
A week ago, Hamid Karzai, Afghan president, met Mr Obama in the White House with the two countries at odds over reports of civilian casualties from US air strikes in Farah province.
Mr Karzai called on Washington to halt air strikes in his country only to be rebuffed by US officials.