The world’s most prestigious management-consulting firm, McKinsey & Company, has been drawn into a national reckoning over who bears responsibility for the opioid crisis that has devastated families and communities across America.

In legal papers released in unredacted form on Thursday, the Massachusetts attorney general said McKinsey had helped the maker of OxyContin fan the flames of the opioid epidemic. McKinsey’s consultants, the attorney general revealed, had instructed the drug company, Purdue Pharma, on how to “turbocharge” sales of OxyContin, how to counter efforts by drug enforcement agents to reduce opioid use, and were part of a team that looked at how “to counter the emotional messages from mothers with teenagers that overdosed” on the drug.

The McKinsey disclosures are part of a lawsuit Massachusetts filed against Purdue Pharma, accusing the company of misleading doctors and patients about the safety of opioid use. Even when the company knew patients were addicted and dying, it still tried to boost sales of opioids, the lawsuit alleges, adding, “All the while, Purdue peddled falsehoods to keep patients away from safer alternatives.”

Purdue Pharma helped plant the seeds of the opioid epidemic through its aggressive marketing of OxyContin. More than 130 people die each day in the United States — 47,000 in 2017 — after overdosing on opioids, according to the National Institute on Drug Abuse.