The ruling from the European Court of Human Rights could see some gunmen paid up to EUR 9,000 ($11,000).
The pirates, who attacked French vessels, were not immediately brought before a French judge, the court said.
The ruling applies to nine men, the BBC reported.
French authorities were found to have kept them in custody for an extra 48 hours, violating the European Convention on Human Rights.
The pirates had held French citizens hostage after seizing a French-flagged cruiseship and a French yacht in 2008.
The judges argued that the time between their arrest and transfer to France was already enough for France to draw up charges, instead of delaying for another two days.