Merck & Co. MRK, +0.53% MRK, +0.76% is in advanced talks to acquire Seagen Inc. SGEN, -0.93% and is aiming to finalize a purchase of the cancer biotech in the next few weeks, according to people familiar with the matter, in a deal that could be worth roughly $40 billion or more.

The companies are discussing a price for Seagen above $200 a share and are seeking to seal a deal on or before the announcement of Merck’s second fiscal-quarter earnings, set for July 28, the people said. Seagen’s stock closed at $175.13 on Wednesday.