Three men survived the ordeal, police sources said, despite being left for 14 hours in the burning Iraqi summer heat.
They had apparently been caught up in a firefight between US troops and Iraqi gunmen, and were detained after taking an injured colleague to hospital.
Police commandos face numerous claims that they abuse and torture detainees.
Meanwhile, gunmen have attacked an Iraqi army checkpoint north of Baghdad, killing at least nine soldiers.
Police sources told the BBC that at least 12 men had been arrested on Sunday after they had taken a colleague to hospital in Ameriya with gunshot wounds.
A local resident, thinking they were insurgents, called the police, who sent commandos to arrest the men.
The survivors were taken to a central Baghdad hospital where staff said a ninth man died.
The Iraqi capital suffers scorching heat during the summer months, with temperatures often reaching 50 degrees.
A doctor told the BBC that one of the survivors had said he had been given repeated electric shocks by the commandos.
The survivors were kept under police guard as they were treated and were taken away without being allowed to speak to journalists.
Recent UK press reports have alleged police commandos systematically torture and abuse detainees. The security forces themselves are the target of much of Iraq's insurgency violence.
Gunmen struck early on Monday at Iraqi army checkpoint in Khalis, near Baquba, about 65km (40 miles) north-east of the capital.
The raid began shortly after dawn and lasted more than 30 minutes, with gunmen using assault rifles, mortars and machine guns during the attack.
The BBC's Joe Floto in Baghdad says this kind of infantry-style assault by insurgents is uncommon, but it demonstrates their ability to gather in armed units and mount coordinated and relatively well-resourced attacks.
Two US marines were killed on Sunday during security operations in the town of Hit, 150 kilometres (90 miles) west of Baghdad, the US military has announced.
In Baghdad, relatives have buried a mother and eight of her children who were killed in their beds in the Baladiyat area on Sunday.
Neighbours said the victims - Shias, the youngest of whom was two years old - had all been shot in the head. The father, who slept outside the house that night, said he believed the attack had sectarian motives.