According to the local government officials, the clash took place in Chaparhar district of Nangarhar on Tuesday.
Provincial police spokesman Hazrat Hussain Mashriqwal said at least 11 Taliban insurgents were killed and 9 others were wounded during the gun battle.
He said at least 5 militants affiliated with the Islamic State were also killed and 2 others were wounded.
Mashriqwal further added a commander of the Taliban group identified as Mohammad Hakim was also among those killed.
The Taliban militants group has not commented regarding the report so far.
Nangarhar is among the relatively volatile provinces in eastern Afghanistan where anti-government armed militant groups are actively operating in a number of its district and often carry out insurgency activities.
Militants loyal to the Islamic State of Iraq and Syria (ISIS) terrorist group have also started gaining foothold in parts of Nangarhar province where sporadic clashes are often reported between Taliban and ISIS militants in this province.