The operation, details of which remain unclear, took place on Thursday. The security forces sought to storm a house in the village of Al Rashayed in Babylon, a central province.
The official Iraqi News Agency gave a death toll of 20 civilians from the same family, and said that the owner of the property had opened fire and "refused to surrender".
Interior Ministry official Saad Maan posted a video of the premises on Twitter, showing a damaged house with gutted doors and windows.
He denounced a "crime on all levels", without identifying those to blame, and said the investigation would "understand all the circumstances of the incident".
During a visit to Al Rashayed on Friday, Interior Minister Othman Al Ghanimi sacked the Babylon police chief and said a commission would investigate the unit that carried out the operation.
In a brief initial statement, the security forces said they had "pursued two individuals accused of terrorism" who "opened fire indiscriminately" once surrounded.
An investigation was opened "after the discovery of a number of dead bodies of citizens in a house", the statement added.
Security sources and media outlets suggested that a suspect linked with ISIS or drug trafficking rings had been involved.
The Iraqi-Kurdish news agency Rudaw identified the suspect as Rahim Kazem Al Ghurairi and quoted his sister as saying that the security forces were responsible for the deaths.
Reporter's code: 50101