Aid agency Medecins Sans Frontieres says it will pull out of Afghanistan because of the killing of five of its staff and the risk of further attacks.
The Taleban claimed responsibility for the June attack
The group said it was unhappy with a government probe into the June deaths.
It also accused US-led forces in Afghanistan of using humanitarian aid for "military and political motives". The US military rejected the claims.
The Nobel prize-winning agency has continued to operate through the country's upheavals for 24 years.
The BBC correspondent in Kabul, Andrew North, says the decision of MSF (Doctors without Borders) is sending shockwaves through the country's aid community.
Some experts say the move will have a knock-on effect on other aid groups.
Kenny Gluck, head of MSF operations in Afghanistan, criticised the Afghan government's failure to prosecute those responsible for the deaths of the MSF workers in the 2 June attack.
"Government officials have let us know that they have credible evidence about the identity of the killers but they have not been willing so far to arrest them and bring them to justice," Mr Gluck said.
"We think this is sending a message of impunity for the killing of aid workers."
Mr Gluck also said the US coalition was deliberately giving the impression that humanitarian aid was in support of its military and political objectives.
"We think the image of ourselves and other aid actors in Afghanistan is being undermined by this," he said.
The US military has denied it might be endangering aid staff.
Maj Jon Siepmann said aid groups should "direct their concern towards the Taleban, towards al-Qaeda. We do nothing here but help".
MEDECINS SANS FRONTIERES
Founded in 1971 by group of French doctors
Headquarters in Brussels and offices in 18 countries
Has operations in more than 80 countries
Has more than 2,000 expatriate volunteers, with an average age of 30-35
Work includes restoring hospitals, providing vaccinations and improving sanitation and water supply
In Afghanistan, continued to work through Soviet invasion, mujahideen wars and Taleban rule
A spokesman for the Afghan interior ministry regretted the MSF decision, and said authorities were still hopeful of bringing those responsible to justice.
Phil Halton, manager of an organisation that offers security advice to aid agencies, told the BBC that he was not surprised at MSF's decision as the number of aid staff killed this year was already double last year's total.
Three European and two Afghan staff died in the attack on MSF in north-west Afghanistan in June.
A Taleban spokesman said it carried out the attack, saying MSF staff were working for American interests.
Police arrested 13 people but all were later released and investigations are continuing.
The MSF statement also refers to the fact that humanitarian workers have increasingly become the target of violence in the country, something that never happened even during the worst periods of factional fighting in the 1990s.
Militants have been blamed for attacks that have killed more than 30 aid workers since March last year.
MSF is known for operating in some of the most dangerous parts of the world.
In Afghanistan it has 80 foreign and 1,400 Afghan staff to provide independent humanitarian aid.
The organisation was in Afghanistan during the Soviet invasion and through the worst years of the 1990s civil war and Taleban rule.