Tens of thousands of people have fled as government forces fight to oust IS from Fallujah, a city 50 kilometres (30 miles) west of Baghdad.
Some of those screened have accused security forces of beating and torturing them.
Of those detained, 2,185 were suspects based on testimonies or other information, while 11,605 were released and about 7,000 were still being checked, said a spokesman for Iraq’s Joint Operations Command.
When fleeing civilians reached government forces, teenaged boys and men were screened separately, with some being released after a few hours while others underwent more thorough interrogation.
Relatives mobbed Iraqi officials at a camp for displaced last week to ask about the fate of hundreds of missing males.
One man said he was held for four days without anything to drink or eat by the Popular Mobilisation forces, an umbrella organisation for volunteer fighters dominated by Iran-backed Shiite militias.
Another said detainees were beaten, and others had similar accounts of torture.
Human Rights Watch this month called for Iraq to “unravel the web of culpability underlying the government forces’ repeated outrages against civilians”.
HRW said it had received credible allegations that federal police and pro-government forces executed at least 17 people fleeing the fighting in Sijr, northeast of Fallujah.
The watchdog also listed reports of civilians being stabbed to death and others dying after being dragged behind cars in the Saqlawiya area, northwest of Fallujah.
Prime Minister Haider al-Abadi’s office previously said that he had issued “strict orders” for prosecutions in the event of any abuses.
IS overran large areas north and west of Baghdad in June 2014, but Iraqi forces have since regained significant ground from the jihadists, who now hold only one major city in the country.