Fujifilm President Kenji Sukeno, left. The company, which got its start in film and cameras, remade itself as that business slowed. Photo: Yoshio Tsunoda/Zuma Press

Xerox Holdings Corp. XRX 3.55% and Fujifilm Holdings Corp. FUJIY 0.49% agreed to end a 57-year-old joint venture more than a year after an attempt at a full merger soured.

Xerox has agreed to sell its 25% stake in the venture, Fuji Xerox, to Fujifilm as part of a deal that will bring Xerox total proceeds of $2.3 billion, the companies said.

Xerox has also agreed to sell a majority stake in a smaller joint venture to an affiliate of Fuji Xerox and extended the timeline of an agreement allowing Fujifilm to be a major supplier to Xerox, the companies said.

Fujifilm’s lawsuit against Xerox for walking away from a planned deal with Fuji Xerox that would have effectively combined the two companies will be dismissed as part of the deal, they said.

Fuji Xerox, established in 1962, sells copiers and printers in the Asia-Pacific region. It generated revenue of roughly $9.3 billion in its most recent fiscal year, ended March 31, according to its website.

Exiting the venture and removing the lawsuit could free the companies to make major shifts in direction both strategically and geographically.

Tokyo-based Fujifilm, which got its start in film and cameras, remade itself as that business slowed and now derives most of its revenue from document services—mainly copiers—and health care, which includes everything from in vitro diagnostic systems to pharmaceuticals and skin-care products.

Xerox, based in Norwalk, Conn., is in the midst of a cost-cutting program under Chief Executive John Visentin that has made its stock one of the S&P 500’s top performers so far this year. Mr. Visentin on an earnings call last week said that the company’s improved cash flow gives it the means to expand within its industry and in adjacent markets.

Fujifilm and Xerox agreed to combine in January 2018 in a complex deal in which Fujifilm would have traded its 75% stake in the Asian joint venture for a 50.1% stake in a new Xerox that would operate world-wide. Xerox shareholders would also have been paid $2.5 billion via a special dividend.

The deal fell apart after two of Xerox’s biggest shareholders—activist investors Carl Icahn and Darwin Deason—argued it undervalued Xerox. That prompted Xerox to walk away and strike a settlement that gave the men control of its board and replaced its CEO with Mr. Visentin.

Fujifilm sued Xerox in June 2018 for breach of contract and estimated damages of more than $1 billion. It alleged Xerox unlawfully terminated the merger due to pressure from Messrs. Icahn and Deason.

Some analysts and investors expected that pressure from the lawsuit could eventually bring Xerox back to the negotiating table. But the two sides publicly disagreed about how much Xerox was worth, with Messrs. Icahn and Deason arguing a deal would need to value Xerox at $40 a share or more in cash. Xerox shares closed Monday at $34.67.

Write to Cara Lombardo at cara.lombardo@wsj.com

Copyright ©2019 Dow Jones & Company, Inc. All Rights Reserved. 87990cbe856818d5eddac44c7b1cdeb8