Ernst & Young LLP will pay $10 million to settle a regulatory investigation into allegations that it improperly obtained confidential information in pursuit of a contract to audit a public company’s books.

The Securities and Exchange Commission also fined four accountants allegedly involved in the misconduct: an Ernst & Young partner, two retired partners and a former chief accounting officer of the unnamed client company who shared the competitive information with them, according to the agency. The four accountants were all suspended from reviewing the financial statements of public companies for periods ranging from one to three years.

Ernst & Young and the four accountants agreed to settle the SEC’s claims without admitting or denying misconduct.

The SEC’s settlement order didn’t name the audit client. But William G. Stiehl, the former chief accounting officer, worked in that role for Sealed Air Corp. until he was terminated in June 2019, according to a regulatory filing made by the company. The Wall Street Journal reported in February 2020 that the SEC and federal prosecutors were probing concerns that Mr. Stiehl rigged the competition to help Ernst & Young win Sealed Air’s multimillion-dollar audit contract.

The SEC’s investigation described frequent contacts between Mr. Stiehl and the audit partners. Late in the bidding process, when Ernst & Young was a finalist for the work along with another accounting firm, Mr. Stiehl attended an NFL game in Ernst & Young’s suite in Charlotte, N.C., according to the SEC.

“Auditor independence is not merely an obstacle to overcome, it is the bedrock foundation that supports the integrity, transparency, and reliability of financial reporting,” SEC official Charles Cain said in a statement. “EY and its partners lost sight of this fundamental principle in their pursuit of a new client.”

Attorneys for Ernst & Young and the four accountants declined to comment. A spokesman for Sealed Air didn’t immediately respond to a request for comment.

Ernst & Young said in a statement that the allegations date from a bid that occurred in 2014. The Big Four accounting firm said it is “committed to competing fairly for new business and on the basis of our qualifications and merits.”

Mr. Stiehl, 59 years old, was previously a senior executive at Carlisle Cos., which also used Ernst & Young as its auditor, the Journal reported last year. In that earlier corporate role as well as one other, he had “worked closely” with James Herring, one of the Ernst & Young partners, and came to view him as a “trust advisor,” the SEC said in a settlement order.

When Mr. Stiehl joined Sealed Air in 2013, he began providing Mr. Herring with confidential information about Sealed Air’s efforts to engage a new audit firm, the SEC’s order said. Mr. Stiehl allowed Ernst & Young to help draft portions of his company’s request for proposal before it was released, according to the SEC.

He also gave Ernst & Young the proposals of other accounting firms competing for the work, as well as internal documents prepared for Sealed Air’s audit committee, often before the committee members received them, the SEC said.

In late 2014, after Sealed Air selected Ernst & Young for the work, Mr. Stiehl sent an email to another Ernst & Young partner—a former college roommate—that read: “Back in the family!!!”

Ernst & Young partners characterized the selection as a “$10 million a year annuity which will span across multiple services lines,” the SEC’s order said. An Ernst & Young case study on the effort to get the contract, prepared shortly after the award was made, described its access as a “head start none of the other firms were given,” according to the SEC. The Journal reported last year that KPMG LLP also bid for the Sealed Air audit work.

Mr. Herring, 47, still works at Ernst & Young, according to the SEC and the accounting firm. He agreed to pay $50,000 to settle the SEC’s allegations and agreed to a three-year suspension from auditing public companies.

Mr. Herring shared the information he got from Mr. Stiehl with two other Ernst & Young partners, James A. Young and Curt W. Fochtmann. Mr. Young, who retired last year, is listed in regulatory records as the partner who was in charge of Sealed Air’s audit from 2016 through 2018.

Mr. Young agreed to pay a $25,000 fine and serve a two-year suspension, the SEC said. Mr. Fochtmann, 61, agreed to pay $15,000 and was suspended for at least one year, the SEC said. He also retired from Ernst & Young last year, according to the regulator.

Sealed Air disclosed earlier this year that the U.S. attorney’s office for the Western District of North Carolina had closed its investigation and wouldn’t take action against the company. The packaging company said Monday that SEC officials told the company they wouldn’t recommend enforcement action against it. “Sealed Air is pleased to put this matter behind it,” the company said in a news release.

Sealed Air terminated its relationship with Ernst & Young in August 2019.

Ernst & Young paid $9.3 million in 2016 to settle an earlier SEC investigation of auditor-independence rule violations. That investigation examined conduct from 2012 to 2014 and faulted an Ernst & Young audit partner for maintaining too-cozy ties to senior executives of a client, including giving sports tickets to one of them.

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