The protesters on Sunday also called for the international community to put pressure on the Iraqi and US authorities to ensure that such abuse does not recur.
Carrying posters of tortured detainees, disfigured dead bodies and US soldiers detaining locals, the nearly 400 mostly Sunni demonstrators marched from the office of the Front for National Dialogue, a Sunni political group, in the western neighbourhood of Jamia.
They then dispersed peacefully.
"We condemn torture and we call on the United Nations and the international community to put pressure on the Iraqi government and the Americans," Ali al-Sadun, of the Sunni Muslim group, told the demonstrators.
"We want all the detainees released."
Anger about detainee abuse has increased sharply since US troops found 173 detainees at an Interior Ministry prison in Baghdad's Jadriya neighbourhood.
The mainly-Sunni detainees were found malnourished and some had torture marks on their bodies.
The demonstration also comes as Iraqi officials met in Egypt at a reconciliation conference organised by the Arab League.
Rizaiqa Fail came from Mahmudiya, about 30km south of Baghdad, to take part in the march.
"We came here to condemn the acts of the government in its prison against our sons held there," the 45-year-old housewife said.