The surprise attack took place in the early hours of Friday in al-Azim district of Diyala, east of Iraq, Al-Forat News reported.
A security source told the news outlet that 11 army forces, including an officer, were killed in the raid.
Investigations have been launched into the incident, the source went on to say.
Another source told AP that Daesh elements broke into the barracks at 3am local time and shot dead the soldiers before fleeing.
The source said army reinforcements were sent to the village where Friday’s attack occurred, and security forces deployed in surrounding areas.
In 2017, Iraq declared victory over Daesh by reclaiming all of its territory – about a third of the country’s area – invaded by the terrorist group in 2014.
However, the terror group still maintains sleeper cells in some areas of Iraq and periodically launches attacks.