Inmates, according to the lawsuit, sleep amid the stench of sewage and are routinely exposed to black mold and crawling vermin.
Brown-tinted, foul-smelling water spills from rusty faucets, and the two jails are also excessively cold, said the lawsuit, which is being handled by the Manhattan law firm of Shearman & Sterling.
"Nobody should be forced to live in the sickening conditions that exist in the Suffolk County jails," said Amol Sinha, director of the NYCLU's Suffolk County chapter.
"Raw sewage bubbles from floor drains, rodents and roaches infest the kitchens, black mold covers the showers -- it shocks the conscience. That county officials have allowed such horrendous conditions to persist for years is simply shameful," Sinha said.
Chief Michael Sharkey of the Suffolk County sheriff's office, which runs the jails, disputes the claims.
"We intend to vigorously defend those allegations," he said, declining further comment.
Vanessa Baird-Streeter, spokeswoman for County Executive Steve Bellone, said: "We are presently examining the lawsuit and have no comment."
The lawsuit contends that the inmates' Eighth Amendment right to be free from cruel and unusual punishment is being violated.
Attorneys for the plaintiffs said inmates frequently come down with skin rashes and fungal infections on their feet and hands, and they routinely cough, vomit and suffer from nausea.
Their pleas for relief, expressed in grievances they are allowed to file with correction officials, routinely go unanswered or are responded to with intimidation or threats, such as being placed in solitary confinement, according to the lawsuit.
The two jails hold about 1,800 inmates, officials said.
Nassau County's jail in East Meadow is also facing legal challenges. The 1,600-inmate facility has come under scrutiny after a string of deaths. There have been five suicides at the lockup since January 2010.
The mother of a former Marine who hanged himself in the jail recently filed a $22 million wrongful-death suit.