Iran Press/Europe: Court judges highlighted instability and lack of co-operation with investigators in the country.
The ruling was hailed by US President Donald Trump as a "major international victory" but human rights group Amnesty International criticized it, BBC reported.
It comes a week after the US revoked ICC prosecutor Fatou Bensouda's visa.
That was thought to have been in response to her request to investigate possible crimes committed by US forces in Afghanistan.
Explaining their unanimous decision, the three ICC pre-trial chamber judges said such an investigation "would not serve the interests of justice".
Trump said it was a victory "not only for these patriots but for the rule of law".
In his statement, he called the ICC "illegitimate" and said it would be met with a "swift and vigorous response" if it tried to prosecute citizens of the US or its allies.
Amnesty said the refusal to investigate was a "shocking abandonment of victims" that would "weaken the court's already questionable credibility.
Amnesty's Biraj Patnaik said the decision would be seen as a "craven capitulation to Washington's bullying".
But while the court said there was "a reasonable basis" to believe crimes had occurred, judges said Afghanistan's current situation "make the prospects for a successful investigation and prosecution extremely limited".
They also cited the long period that had passed since the investigation began in 2006, and said the court needed to "use its resources prioritizing activities that would have better chances to succeed".
The war in Afghanistan started by United States invasion on 7 October 2001. The US terrorist Army was supported by NATO. One of the claimed war's aims was to remove the Taliban from power and to bring peace to the country.
After 18 years, the US and NATO have been unable to bring peace to Afghanistan, but also their military presence in Afghanistan is the main reason for increased violence and killings. 101/211/201
Read More:
Afghan official : US military presence causes insecurity in Afghanistan
US bombing in Afghanistan increases significantly in 2018