The Ministry of Defense said the two militants were killed in the restive Achin district.
No further details were given by the ministry and it is yet not clear if the militants were killed in Afghan forces raid or US airstrike.
This comes as at least 2 loyalists of the terror group were killed in a US drone strike in Achin district last week.
Both the Afghan and US forces conducted regular strikes against the loyalists of the terror group in this province.
The increased raids, usually involving drone strikes, by the US forces followed a broader role granted by the Obama administration earlier this year.
The broader role was granted amid concerns that the loyalists of the terror group are attempting to expand foothold in the country and turn the eastern Nangarhar province into a regional operational hub for its fighters.
The deputy house speaker of the Afghan parliament Zahir Qadir earlier warned that the loyalists of the terror group are attempting to establish the Khurasan Caliphate in Afghanistan and are busy expanding their presence in some of the difficult terrains of the country.
Speaking during a session of the parliament late in the month of October, Qadir warned that the group will become successful in establishing the caliphate if they managed to seize control of Tora Bora in Nangarhar.