Staff Sergeant Frederick, aged 38, who is a prison officer in civilian life, was also reduced in rank, forfeited pay and given a dishonourable discharge.
The sentencing came a day after he admitted to eight counts of abusing and humiliating Iraqi detainees in a plea bargain that saw some charges dropped.
It was the longest prison sentence yet in connection with the scandal that broke in April with the publication of photos and video that showed American soldiers abusing naked Iraqis in the prison on the western outskirts of Baghdad.
Frederick is one of seven members of the Maryland based 372nd Military Police Company charged in the scandal.
Specialist Jeremy Sivits is serving a one year sentence after pleading guilty in May to three counts.
Frederick acknowledged his part in the scandal but also blamed his chain of command, telling the court that prisoners were forced to submit to public nudity and degrading treatment “for military intelligence purposes.”
He testified that he was given no training or support in supervising detainees and only learned of regulations against mistreatment after the abuses occurred last year.
He said that when he brought issues up with his commanders, “they told me to do what MI told me to do,” referring to military intelligence.
“I was wrong about what I did and I shouldn’t have done it,” Frederick told the judge, Colonel James Pohl.
Chief Warrant Officer Kevin Kramer, a military intelligence soldier called as a witness, referred to an e-mail from the US command in Baghdad telling him to order his interrogators to be tough on prisoners.
“The gloves are coming off, gentlemen, regarding these detainees,” said the e-mail, which was read into evidence. It added that the command “wants the detainees broken.”