J&J shares rose 5% in extended trading following the decision. Shares of other drugmakers, including Teva Pharmaceutical Industries Ltd and Endo International Plc also rose after-hours.
The case brought by Oklahoma Attorney General Mike Hunter was the first to go to trial out of thousands of lawsuits filed by state and local governments against opioid manufacturers and distributors.
Oklahoma sued J&J to help it address the epidemic for the next 30 years through addiction treatment and prevention programs.
"The opioid crisis is an imminent danger and menace to Oklahomans," Balkman said as he delivered his decision from the bench.
The trial came after Oklahoma resolved claims against OxyContin maker Purdue Pharma LP in March for $270 million and against Teva in May for $85 million, leaving J&J as the lone defendant.
The litigation has been closely watched by plaintiffs in about 2,000 opioid lawsuits pending before a federal judge in Ohio who has been pushing for a settlement ahead of an October trial.
Some plaintiffs' lawyers have compared the opioid cases to litigation by states against the tobacco industry that led to a $246 billion settlement in 1998.
Opioids were involved in almost 400,000 overdose deaths from 1999 to 2017, according to the US Centers for Disease Control and Prevention. Since 2000, some 6,000 Oklahomans have died from opioid overdoses, according to the state's lawyers.
During the trial, lawyers for Oklahoma argued that J&J carried out a years-long marketing campaign that minimised the painkillers' addiction risks and promoted their benefits.
The state's lawyers called J&J an opioid "kingpin" and argued that its marketing efforts created a public nuisance as doctors over-prescribed the drugs, leading to a surge in overdose deaths in Oklahoma.
J&J has denied wrongdoing, saying its marketing claims had scientific support and that its painkillers, Duragesic and Nucynta, accounted for a tiny fraction of opioids prescribed in Oklahoma.
The company also said in a statement that since 2008, its painkillers accounted for less than 1 per cent of the US market, including generics.
Lawyers for New Jersey-based J&J have said the case rested on a "radical" interpretation of the state's public nuisance law.
J&J on Monday, prior to the decision, called the state's attempt to use public nuisance law to resolve a complex social problem "misguided and legally unsustainable."
"Not once did the state identify a single Oklahoma doctor who was misled by a single Janssen statement, nor did it prove that Janssen misleadingly marketed opioids or caused any harm in Oklahoma," John Sparks, Oklahoma counsel for Johnson & Johnson, said in a statement.
Janssen Pharmaceuticals is the healthcare conglomerate's primary prescription drugs unit.
J&J said it has not set aside a litigation reserve to pay potential damages, and that its policy is to do so once a loss is "probable and can be reasonably estimated."