The American Civil Liberties Union is urging the court to strike down the law, which would charge violators with a misdemeanor or fine them up to $250.
A representative for the ACLU says the ordinance is an assault on everyone's rights.
The city of Fresno says it cannot comment on pending litigation.
However, officials have said in the past that waste left at encampments is a danger to public safety, and they've highlighted efforts to provide housing for those experiencing homelessness.
In filing this lawsuit, the ACLU hopes to stop the ordinance from going into effect on March 31 and ultimately wants it voided altogether.