WASHINGTON—McKinsey & Co. has agreed to pay $18 million to settle allegations that it didn’t adequately guard against the risk of insider trading involving investments in companies for which the firm was also a consultant.

McKinsey partners had access to material nonpublic information at companies such as Alpha Natural Resources Inc. and SunEdison Inc. through the bankruptcy work the consulting firm did for those companies, according to the Securities and Exchange Commission. Meanwhile, another unit of McKinsey, MIO Partners...

WASHINGTON—McKinsey & Co. has agreed to pay $18 million to settle allegations that it didn’t adequately guard against the risk of insider trading involving investments in companies for which the firm was also a consultant.

McKinsey partners had access to material nonpublic information at companies such as Alpha Natural Resources Inc. and SunEdison Inc. through the bankruptcy work the consulting firm did for those companies, according to the Securities and Exchange Commission. Meanwhile, another unit of McKinsey, MIO Partners Inc., which managed the partners’ retirement funds, invested in outside hedge funds that were investors in those companies, the SEC said.

The SEC didn’t accuse McKinsey or any employees of insider trading but said the firm should have had better policies to ensure partners didn’t misuse confidential information. McKinsey’s MIO unit settled the SEC’s investigation without admitting or denying wrongdoing.

McKinsey spokesman DJ Carella said, “The historical issues identified in the SEC order have been resolved by MIO through strengthened policies and procedures, and the Order does not identify any misuse of confidential or material nonpublic information by either MIO or McKinsey.”

The firm in 2019 paid $15 million to settle Justice Department allegations that it failed to make required disclosures of potential conflicts in three bankruptcy cases on which it advised.

“Allowing individuals who may possess or have access to material nonpublic information also to have oversight over investment decisions that may benefit them economically presents a heightened risk of misuse,” said Gurbir Grewal, the SEC’s enforcement director. “It is crucial that investment advisers have robust compliance policies and procedures in place to address the risks inherent to their organizational structures.”

The firm’s conflicts of interest in its bankruptcy advisory cases were the subject of a 2018 investigation by The Wall Street Journal. In seven of the 14 Chapter 11 bankruptcy cases in which McKinsey acted as an adviser to the debtors, the Journal found, the firm had a financial interest in the outcome. 

McKinsey’s investments were made through MIO Partners, which provided investment options to the firm’s partners and employees. While most investment selection was outsourced to hedge funds, MIO directly invested about 10% of the funds it handled, the SEC said.

The SEC said MIO was a direct investor in municipal bonds issued by Puerto Rico at the same time McKinsey was providing advice to the island’s Financial Oversight and Management Board, which was in charge of its plan to go through bankruptcy.

A McKinsey spokesman in 2018 told the Journal that MIO Partners “operates primarily as a ‘fund of funds,’ investing in a broad set of third-party managers who make specific investment decisions, independent of MIO and McKinsey & Co.”

McKinsey partners who decided on investments for MIO sold about $1 million of Puerto Rican bonds in 2017, when they had access to confidential information about the island’s financial situation, the SEC said in a settlement order.

In the example involving Alpha Natural Resources, the SEC said McKinsey partners were aware that MIO had an investment in a hedge fund that had bought the coal producer’s bonds. The SEC’s settlement order said the situation created “a risk that McKinsey…could influence the reorganization plan in a way that favored MIO’s investments.”

Corrections & Amplifications
McKinsey spokesman DJ Carella gave a statement after the SEC’s announcement of a settlement. An earlier version of this article incorrectly attributed the statement to David Press, a spokesman for MIO, a subsidiary of McKinsey. (Corrected on Nov. 19)

Write to Dave Michaels at dave.michaels@wsj.com