The spokesman for the governor of Nangarhar province, Ahmad Zia Abdulzai, said another eight police were wounded in the attack in the Achin district, bordering Pakistan.
Afghanistan responded to the pre-dawn attack with a wave of airstrikes that killed 85 IS militants, according to a statement from the Afghan intelligence agency. "All the terrorists killed were Pakistani citizens," under the command of Hafiz Saeed, who was also killed, the National Directorate of Security statement said.
Until now IS loyalists in Afghanistan have only clashed with Taliban insurgents. The two militant groups are fighting for Islamic rule but are bitterly divided over strategy and leadership.
A statement purportedly issued by an IS affiliate claimed a "big attack" in Nangarhar.
Also Read
The group, referring to itself as the Khorasan Province of the Islamic State, posted a statement on Twitter that was circulated by supporters. It said militants seized two army barracks in Achin, set fire to an army vehicle, seized weapons and killed nine "apostates."
He said IS militants "started their activities months ago in Nangarhar" and clashed with the Taliban. He said they drove the Taliban out of Achin, Dih Bala and Nazyan districts over the last two months.
IS expansion into Afghanistan has been a concern for both Afghan and international authorities for months, with officials warning that the extremist group was actively recruiting members from other Islamic militant groups, including the Taliban.
Homegrown militants loyal to IS control territory in some parts of the country and have imposed the harsh Islamic rule the group is notorious for in Iraq and Syria. The IS militants in Afghanistan have banned girls from school and forced young women into marriages with fighters, officials and military leaders have said.