Shares of Johnson & Johnson rose in early trading Tuesday after an Oklahoma judge ordered to pay a far smaller fine than expected as a result of its involvement in the state's opioid crisis.

On Monday, the company was ordered to pay Oklahoma $572 million — significantly less than the $17 billion in penalties sought by the state. This was the first U.S. case attempting to hold a drug-maker accountable for fueling the opioid epidemic.

Shares of Johnson & Johnson rose more than 1.8% in early trading Tuesday, implying that the company could grow by more than $6 billion in market cap. Drugmaker Teva Pharmaceutical, Endo International and Mallinckrodt all rallied after the decision Monday. But the companies were trading lower after the opening bell Tuesday.

Teva Pharmaceutical and Purdue Pharma, the privately held maker of OxyContin that taken the brunt of the public's blame for the drug crisis, settled with the state before the trial began. Neither company admitted to any wrongdoing. J&J was the only defendant left in the seven-week trial.

In the landmark ruling Monday, judge Thad Balkman called the drug crisis an "imminent danger and menace" and said Johnson & Johnson and its pharmaceutical subsidiary Janssen "caused an opioid crisis that's evidenced by increased rates of addiction, overdose deaths and neonatal abstinence syndrome."

In an emailed statement to CNBC, Johnson & Johnson said it plans to appeal the case.

"Janssen did not cause the opioid crisis in Oklahoma, and neither the facts nor the law support this outcome," Johnson & Johnson general counsel Michael Ullmann said in a statement. "We recognize the opioid crisis is a tremendously complex public health issue and we have deep sympathy for everyone affected. We are working with partners to find ways to help those in need."

— CNBC's Berkeley Lovelace contributed reporting.