BBC – The firm did not admit liability or wrongdoing in settling with the State.
The payments remove it from a trial due to begin on Tuesday in which several large opioid makers and distributors are defendants.
J&J said the settlements were consistent with a prior agreement to pay $5bn to settle US opioid claims.
The settlement with New York State also calls for J&J to stop selling the painkillers nationwide.
“The opioid epidemic has wreaked havoc on countless communities across New York State and the rest of the nation, leaving millions still addicted to dangerous and deadly opioids,” New York attorney general Letitia James said.
“Johnson & Johnson helped fuel this fire, but today they’re committing to leaving the opioid business – not only in New York, but across the entire country,” she added, saying her focus remained on “getting funds into communities devastated by opioids as quickly as possible”.
Opioids are a class of powerful drugs found in opium poppies that can be used to block pain signals between the brain and the body. They can be found as legal prescription medications, but they can also be found as illegal street drugs such as heroin.
Opioid addiction to both legal and illegal drugs has been a serious ongoing problem in countries such as the US, which had nearly half a million deaths from overdoses between 1999 and 2019, according to the US Centers for Disease Control and Prevention (CDC).
Johnson & Johnson and the largest US drug distributors – AmerisourceBergen, Cardinal Health, and McKesson – have proposed paying a combined $26bn to end thousands of opioid lawsuits.
J&J has also been appealing against an Oklahoma judge’s 2019 ruling that it pay the State $465m for deceptive marketing of opioids.
Tuesday’s opioids trial is one of several scheduled for this year, with others underway in California and West Virginia.
Drugmakers AbbVie and Teva Pharmaceutical Industries and several distributors are among the defendants.
In October, Purdue Pharma, the maker of OxyContin painkillers, reached an $8.3bn settlement and agreed to plead guilty to criminal charges to resolve an investigation into its role in America’s opioid crisis.