The fighting began late on Friday in the Kot area of the Rodat district in eastern Nangarhar province after a contingent of IS fighters attacked police check posts, provincial governor Salim Khan Kunduzi said.
The interior ministry in a statement said at least 18 fighters had been killed and more than 40 others wounded so far, though Kunduzi placed the number of IS fighters killed as high as 36 and said at least a dozen security forces personnel and civilians had also died.
IS fighters began making inroads into Afghanistan in late 2014, winning over sympathisers, recruiting followers and challenging the Taliban on their own turf, primarily in the country's east.
But in March, Afghan President Ashraf Ghani announced that the Islamists had been defeated following a months-long military operation.
Also Read
The US military estimates between 1,000 and 3,000 IS fighters are in Afghanistan, mostly comprised of disaffected Pakistani and Afghan Taliban, as well as Uzbek Islamists and locals.
Earlier this month the US President Barack Obama ordered the US military tackle the resurgent Taliban more directly - in tandem with Afghan allies, ratcheting up a 15-year conflict he had vowed to end.
Pentagon press secretary Peter Cook said the strikes occurred in southern Afghanistan, but he did not provide additional details.