An Alabama judge encouraged defendants who could not pay court fines to donate blood rather than spending time in jail, a US civil rights group has said.
"If you do not have any money and you don't want to go to jail, consider giving blood today," Judge Marvin Wiggins said in a recording released by the Southern Poverty Law Center (SPLC).
Some of the 500 defendants gave blood to avoid jail, but their debt remained.
The practice violates the US Constitution, legal experts said.
Judge Wiggins declined to comment on the allegations when contacted by the New York Times.
"Far too often in Alabama, we find that your legal rights are tied to your bank account," Sara Zampierin, a staff attorney in SPLC's Montgomery, Alabama, office said in a statement on Tuesday.
"It's a two-tiered system of justice - one for those who can pay and another for those who can't. We must stop exploiting the poor."
Ms Zampierin said her organisation has filed an ethics complaint against Judge Wiggins, who has served as a circuit judge in rural Perry County since 1999.
"What happened is wrong in about 3,000 ways," said Arthur Caplan, a professor of medical ethics at New York University, told the New York Times. "You're basically sentencing someone to an invasive procedure that doesn't benefit them and isn't protecting the public health."
In court on 17 September, the defendants were charged with a wide-range of crimes including hunting after dark, assault and drug possession.
The hearing was part of an aggressive effort by Alabama to collect on outstanding fines, restitution, court costs and lawyer fees.
Donations not used
The large legal fees and debts that some defendants incur in the US criminal justice system have received renewed attention recently.
This year a US Department of Justice report on the legal system in Ferguson, Missouri found widespread abuse. Investigators said officials unfairly targeted poor residents with fines in an effort to raise revenue for the town.
LifeSouth, the blood bank the court gave the samples to, eventually discarded nearly all of the blood units collected.
LifeSouth said it prohibits donations like the court's because the donors were offered "potentially an unacceptable incentive".