A separate federal report, also released Thursday, found that the rate of drug overdose deaths dropped in 14 states in 2018, climbed in five and stayed about the same in the rest. The five states whose rates climbed were California, Delaware, Missouri, New Jersey and South Carolina. Ohio saw the biggest drop, to 3,980 overdose deaths in 2018 from 5,111 in 2017.

With the fentanyl death rate still climbing, along with deaths involving cocaine and psychostimulants like methamphetamine, it is not clear whether the overall drop will be sustained.

Mr. Wright, of Delaware, Ohio, developed an opioid addiction when he was 23, starting with prescription pills and moving to heroin. He said he spent years, on and off, sleeping in his car, under bridges and on his parents’ screened porch in the winter under a table so his father wouldn’t see him.

But he has now stayed off drugs for the longest period in his adult life, he said, a fact he attributes to his treatment program together with a change in the attitudes of the people in his town. A small grooming products company, Doc Spartan, hired him to make beard oil and grenade-shaped soap. Someone sold him a cheap car. Others helped him start sorting out his life — getting driver’s license, dealing with his unpaid bills and getting treatment for hepatitis C.

“I literally feel like I’m a soldier in this war, and I really like it,” said Mr. Wright, who now works as a trainer at PSKC, a CrossFit gym, and at a halfway house.

Another bright spot in Thursday’s data was cancer mortality. The overall cancer death rate dropped by 2.2 percent in 2018, a substantial decline.

Rebecca Siegel, the scientific director of surveillance research at the American Cancer Society in Atlanta, said the new data appeared to extend gains from 2017, when the overall cancer mortality rate drop was the largest since record-keeping began around 1930.