A ceremony at Kandahar airfield marked the departure of remaining Royal Air Force personnel after the final British base was handed over to Afghan forces in October.
Since 2001, Britain has suffered 453 military deaths during operations in Afghanistan.
"Britain's armed forces can take great pride in the completion of their deployment to southern Afghanistan," Defence Secretary Michael Fallon said in a statement.
"Thanks to their courage and dedication, the country has the best possible chance of a stable future. Our departure from Kandahar airfield therefore is an historic milestone."
Much of the British fighting took place in neighbouring Helmand province, which remains a Taliban insurgent stronghold and a centre of opium poppy cultivation.
The US-led NATO combat mission will finish at the end of this year, with about 12,500 troops staying on into 2015 to train and support the Afghan army and police.
The British contribution next year will be the supervision of an officers' training academy outside Kabul.
The security challenges facing Afghanistan were underlined on Sunday when a suicide attack killed 57 people watching a volleyball game.
Two NATO soldiers were also killed in an attack in eastern Afghanistan on Monday. NATO did not release their nationalities, in line with coalition policy.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ