Gen McChrystal took command in Afghanistan on 15 June 2009
Gen Stanley McChrystal was commander of US troops in Afghanistan from June 2009 to June 2010.
He was the first officer appointed to the post under the Obama administration.
He was dismissed by President Barack Obama on 23 June 2010 after criticising leading administrative officials in an interview with Rolling Stone magazine.
Chosen for the job by Defence Secretary Robert Gates for his "fresh eyes on the problem", the veteran special forces commander received largely sympathetic media coverage in the US for his fight against Taliban insurgents.
He has cultivated his own image as a kind of ascetic warrior whose daily routine includes sleeping for only four hours, running seven miles and eating just one meal.
But politically, he has been at odds at least twice with Barack Obama.
Last year, the president took him to task for speaking too bluntly about his desire for more troops.
Earlier in June, he found himself recalled to Washington over a Rolling Stone magazine interview entitled Runaway General, in which he and his aides mock the Obama administration.
The Washington Post newspaper said the interview raised "fresh questions about the judgement and leadership style" of the man seen as the architect of American strategy in Afghanistan.
Defence Secretary Gates appointed Gen McChrystal after President Obama was said to have become sceptical about the suitability of his predecessor, Gen David McKiernan.
Gen McChrystal quickly realised the size of the task, sending a bleak assessment to the White House in August that his mission might fail within 12 months without extra troops and faster training for Afghan security forces. He also censured the Afghan government.
"Failure to gain the initiative and reverse insurgent momentum in the near term... risks an outcome where defeating the insurgency is no longer possible," he wrote. "Additional resources are required."
The Afghan strategy review with President Barack Obama proved long and complicated but did result in 30,000 additional US troops, albeit with a pledge to start withdrawing them from July 2011.
Gen McChrystal then oversaw a major offensive, Operation Moshtarak, around Marjah in Helmand province in February 2010.
It was initially hailed as the opening salvo in a year to "turn the tide" but reports continued of Taliban intimidation and a less than stellar performance from Afghan police and an embryonic civil administration.
Another major operation, in Kandahar, is due later in 2010. Gen McChrystal said in June: "When we get Kandahar, it's a great step towards success in Afghanistan."
"I extend my sincerest apology for this profile. It was a mistake reflecting poor judgement and should never have happened."
The general's apology was issued after Rolling Stone quoted him as saying he felt betrayed by the US ambassador to Kabul, Karl Eikenberry, and portrayed him mocking the US special envoy to Pakistan and Afghanistan, Richard Holbrooke.
In the same article, his aides made fun of Vice-President Joe Biden and White House National Security Adviser Jim Jones.
It was even suggested by one, unnamed aide that the general had been less than impressed by President Obama himself at one of their first meetings.
"It was a 10-minute photo op," the adviser told Rolling Stone.
"Obama clearly didn't know anything about him, who he was... he didn't seem very engaged."
When he was appointed, Gen McChrystal appeared to represent the future of warfare as envisaged by Mr Gates and President Obama - away from conventional military planning towards modern, asymmetric warfare.
He swiftly made clear to US and Nato forces that they were to move away from the idea that they were fighting an all-out war against the Taliban and its allies, and instead focus on protecting Afghanistan's civilians.
Gen McChrystal headed Joint Special Operations Command in Iraq
This included halting indiscriminate air strikes, which had killed large numbers of civilians, and getting more troops out on patrol.
Born in 1954 into a military family, Gen McChrystal graduated from the US military academy at West Point in 1976 and spent the next three decades ascending through conventional and Special Operations command positions, which included serving during the Gulf War.
In September 2003, he became commanding general of the Joint Special Operations Command (JSOC), a secretive body responsible for the planning and execution of US military special forces missions abroad. In February 2006, he was promoted to overall commander.
Few details are known, but under his command JSOC forces captured the former Iraqi president, Saddam Hussein, and killed the leader of al-Qaeda in Iraq, Abu Musab al-Zarqawi.
He is said to have built close relationships with other military and intelligence organisations such as the CIA, which JSOC had traditionally avoided.
Gen McChrystal's reputation was somewhat tarnished in 2007, however, when a Pentagon investigation into the accidental killing three years earlier of Cpl Pat Tillman, a former NFL football star, in Afghanistan by fellow Army Rangers held him accountable for providing inaccurate information when recommending him for a medal.
The general had wrongly suggested in a citation that Cpl Tillman had been killed by enemy fire, the investigation found, but the army declined to punish him.
The previous year, a JSOC unit called Task Force 6-26 which led the hunt for Zarqawi was accused of abusing detainees in Iraq.
In 2008, Gen McChrystal became director of the Joint Staff, working for the chairman of the joint chiefs of staff, Adm Mike Mullen.
Soon after reports of the Rolling Stone profile, Adm Mullen issued a statement expressing "deep disappointment with the article and with the comments expressed therein".