"Torture is rampant in Iraq's justice system, yet judges lack instructions for responding to torture allegations," the watchdog's deputy Middle East director, Lama Fakih, said.
"Defendants, including ISIS suspects, won't be able to get a fair trial so long as the security forces can freely torture people into confessing," she added.
Around 20,000 people were arrested in the three-year battle by Iraqi forces to drive out IS, which had seized swathes of western and northern Iraq in 2014.
Two killed in southern Iraq as protests spread
HRW found that in 22 of the 30 cases it reviewed in Baghdad, judges had refused to consider allegations of torture.
In several cases, judges ordered forensic medical examinations and found signs of torture, "but did not necessarily order a retrial or investigation and prosecution of the abusive officers", the group said.
Iraq's constitution outlaws "all forms of physical and psychological torture and inhuman treatment".
HRW called on judicial authorities to "investigate all credible allegations of torture and the security forces responsible".
Islamic State: free Sunni women or Iraqi security men die
Iraq's Supreme Judicial Council should issue guidelines on the steps judges are obliged to take when allegations of torture in custody arise.
The human rights group said parliament should also pass an anti-torture law, requiring judges to order a medical examination of any detainee alleging torture within 24 hours after being notified.
"When judges convict based on coerced confessions and disregard allegations of torture, they are sending a message to the security forces that torture is a valid investigative tool," Fakih said.
"The Iraqi government needs to do much more to ensure that criminal investigations are genuine and impartial, and that officers who torture detainees are appropriately prosecuted."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ