The officials added that the deadly attack took place in Masjid-e-Chobi area of Kurkh District Sunday evening.
At least nine other soldiers were also wounded during the attack.
According to reports, the convoy of the soldiers was heading towards Badghis province when it came under militants attack.
The militants have also stolen some weapons of the armies during the attack.
No further details were released so far regarding the incident.