Defense ministry officials said the two Afghan soldiers were martyred in the past 24 hours.
The officials did not disclose further information regarding the exact location of the incident where the two Afghan soldiers martyred.
The anti-government armed militant groups frequently use improvised explosive device (IED) to target Afghan and coalition security forces.
Improvised explosive device (IED) attacks are also the major contributor to civilian casualties in Afghanistan, as civilians are mostly targeted in roadside bombings.
According to United Nations, 34 percent of 2,959 civilian deaths in Afghanistan in 2013 were due to improvised explosive device (IED) attacks carried out by anti-government armed militant groups.