The lawsuit alleges drugmakers and distributors used "deceptive marketing" that got millions of Americans hooked on potent painkillers.
New York City is suing eight companies that make or distribute prescription opioids, accusing them of fueling a deadly and nationwide epidemic of overdoses.
The lawsuit, filed on Tuesday in the State Supreme Court in Manhattan, seeks $500 million in damages to recover expenses the city has to incur in combating the crisis.
"More New Yorkers have died from opioid overdoses than car crashes and homicides combined in recent years. Big Pharma helped to fuel this epidemic by deceptively peddling these dangerous drugs and hooking millions of Americans in exchange for profit," Mayor Bill de Blasio said in a statement.
"It’s time for hold the companies accountable for what they’ve done to our City, and help save more lives."
The lawsuit alleges the crisis has placed "a substantial burden" on the city through increased substance abuse treatment programs, hospital services, emergency medical services and law enforcement.
The manufacturers named in the lawsuit include Purdue Pharma, Teva, Johnson & Johnson and Allergan.
In separate statements, the companies have either denied the allegations or emphasised the importance of using opioids safely.
Other cities including Chicago and Philadelphia have filed similar lawsuits, as the crisis claims more lives by the day.
Singers Prince and Tom Petty both had the painkiller fentanyl in their systems when they died of accidental overdoses. Petty's family said last week it hoped the rock star's death would spark a nationwide discussion about the crisis.