TOKYO—Toshiba Corp. said two executives and two outside directors would resign after they were accused of working with the government against foreign shareholders, the first fallout in a scandal that has highlighted Japan’s business-government ties.

Sunday’s announcement came three days after a report by outside lawyers depicted wide-ranging cooperation between Toshiba management, the head of the Toshiba board’s audit committee and officials at the Ministry of Economy, Trade and Industry to block foreign shareholders from gaining board influence.

It was the latest blow to the reputation of a company once known world-wide for its laptop computers, television sets and medical equipment. Toshiba, a backbone of Japan’s industrial might with history dating to 1875, has mostly shed its consumer businesses and shrunk to less than half its peak revenue since an accounting scandal broke out in 2015.

Shareholders based outside Japan now control more than half the company after injecting capital in late 2017 to repair Toshiba’s finances. That has given Japan an unprecedented taste of the tactics of U.S.-inspired shareholder activism, as foreign-based investors—including at one point Harvard University’s endowment—have sought shareholder-friendly measures such as buybacks and higher dividends.

The outside lawyers’ report, commissioned by shareholders after a push by the foreign activists, suggested that Toshiba executives and government officials shared concern over the activists’ power. Japan’s government used threats of action under national-security provisions of a Japanese investment law to keep them at bay, and those threats deviated from the law’s intent, the report found.

A particular Toshiba target was one of the company’s top shareholders, Effissimo Capital Management Pte. Ltd., which is based in Singapore and led by Japanese executives who have adopted Western activist practices.

Four outside Toshiba directors with international backgrounds said they were blindsided by the report’s revelations, and accused the all-Japanese lineup of Toshiba and government people cited in the report of hiding their maneuvers from Americans and others on the board who lack Japan Inc. ties.

“The report made clear that certain members of the management and board took actions that were unacceptable and directly against the interests of our shareholders,” said the four directors. They said that as board members, “the information we were provided with was presented in a highly misleading way.”

Toshiba and the Ministry of Economy, Trade and Industry, or METI, declined to comment in detail on the report’s allegations. Toshiba said it would use the lessons of the report to enhance transparency, while the head of METI said that it was acceptable for government officials to talk to companies about national-security implications of shareholder actions. The chairman of Toshiba’s board, Osamu Nagayama, is scheduled to speak at a news conference Monday.

Among those resigning is senior executive vice president Masayasu Toyohara, who according to the report wrote in a May 31, 2020 email that Toshiba and the government were using good-cop, bad-cop tactics against foreign shareholders to “beat them up.”

Also resigning is audit committee chief Junji Ota, a former Nippon Steel Corp. executive. In February, Mr. Ota’s committee said it had investigated allegations of undue pressure placed on foreign shareholders to the fullest extent possible and found nothing suspicious.

The following month, another audit committee member who is resigning, Takashi Yamauchi, wrote in an email to Mr. Ota that the investigation had in fact unearthed damaging information and needed to be concealed. “If it is disclosed to the public, it will make the METI’s methods and close relationship with Toshiba known to the public, which is not in Toshiba’s best interest,” Mr. Yamauchi wrote, according to the law firms’ report.

A Toshiba representative said those resigning weren’t available for comment.

The resignations announced Sunday leave open the fate of the board chairman, Mr. Nagayama, an outside director and former pharmaceutical CEO. Institutional Shareholder Services Inc., which advises global shareholders, said Saturday that Mr. Nagayama shouldn’t be re-elected at Toshiba’s annual shareholder meeting on June 25 because of his failure to hold the audit committee accountable.

The law firms’ report didn’t accuse Mr. Nagayama of direct involvement in pressuring foreign shareholders.

The four directors with international backgrounds said Sunday they believed Mr. Nagayama should stay on the job to lead the board’s efforts. They described the resignations as “an important step in moving towards improved returns to shareholders and enhanced corporate governance.”

The turmoil at Toshiba could open the door for discussion of bigger changes such as consideration of deals to take the company private. A buyout offer in April by private-equity firm CVC Capital Partners was rebuffed by the board led by Chairman Osamu Nagayama, who said the offer didn’t have enough detail to merit consideration.

The company’s CEO post is also in flux. Veteran Toshiba executive Satoshi Tsunakawa returned to the role in April after the departure of the previous CEO but isn’t seen as a long-term leader for the conglomerate.

Foreign activist investors including American hedge funds have taken a bigger role at Japanese companies in recent years, and the relationships are often friendly. SoftBank Group Corp. stepped up share buybacks last year after an investment by Elliott Management Corp., with the two sides sometimes consulting daily.

Nonetheless, the Japanese government continues to see some companies and industries as strategically sensitive and works to contain foreign influence. Toshiba is a defense contractor and leading player in Japan’s nuclear-power industry as it cleans up meltdowns at the Fukushima Daiichi nuclear plant.

Write to Peter Landers at peter.landers@wsj.com and Megumi Fujikawa at megumi.fujikawa@wsj.com