In a statement, the Defense Ministry said a car bomber targeted army troops in Monday's incident in the district of Sayed Abad in Wardak province, killing eight soldiers and wounding nine more, Reuters reported.
The Taliban, claiming responsibility, said dozens of Afghan special forces were killed in their latest deadly assault on government forces, who have suffered many casualties in the recent fighting.
Clashes have grown in recent weeks between Afghan government forces and Taliban militants after the government failed to free hundreds of jailed Taliban as part of a prisoner swap agreed by the warring sides.
A pact signed by the United States and Taliban in Doha in February laid out plans for a withdrawal of foreign forces from the war-torn country in exchange for security guarantees from the militants.
But negotiations between the Afghan government and the Taliban for a peace settlement to end the 18-year-old war have been delayed over the release of nearly 600 Taliban prisoners Kabul says were involved in major attacks.
As part of the Doha deal, the Afghan government has released more than 4,000 Taliban prisoners and the militant group has freed hundreds of government troops.