A researcher prepares a sample inside a laboratory at BeiGene Ltd.'s research and development center in Beijing, China, on Thursday, May 24, 2018.

BeiGene will commercialize some of Amgen's cancer drugs to be sold on the Chinese market, the companies said in a statement. Amgen will also work with BeiGene on developing 20 new drugs from its cancer pipeline in China and elsewhere. The deal, expected to close in early 2020, increases Amgen's footprint in China's rapidly growing pharmaceutical market.

The all-cash deal values BeiGene at $174.85 per American depository share, a 25% premium to BeiGene's closing price on the Nasdaq on Wednesday.

Biotechnology company Amgen announced Thursday it is investing $2.7 billion in BeiGene , taking a 20.5% stake in the Chinese biotech firm.

"For a number of years, we've had as one of our key focuses for the company building out the business globally," Amgen Chief Financial Officer David Meline told CNBC. "This is an important piece that was remaining for us, and we think that will fill out that chessboard, if you will."

BeiGene develops molecularly targeted and immuno-oncology drugs to treat cancer. With roughly 4 million people diagnosed with cancer annually, Amgen says it has expanded its geographic presence from approximately 50 to 100 countries since 2011.

"The focus now is ensuring novel therapies that address a high unmet medical need are approved as quickly as in the West or other parts of Asia," said Murdo Gordon, Amgen's executive vice president for global commercial operations.

The deal also comes amid the ongoing U.S. trade war with China. President Donald Trump has recently pressured U.S. firms to restrict financial investments in Chinese entities.

Meline said Amgen is "very conscious of the dialogue that's going on between the governments."

"We don't expect that there will be any reasons why there would be political pushback, because it's pretty straightforward, to be honest," he added.

John Oyler, chairman and CEO of BeiGene, also commented on trade talks, saying the company is "just focused on trying to fight cancer."

"We say this all the time, but cancer is a common enemy," Oyler said. "It doesn't have any borders, and our company doesn't have any borders. BeiGene's a global company; we happen to have a lot of strength in China, but we're fighting everywhere we can. We do believe this is a global fight."

Goldman Sachs is acting as the financial advisor to Amgen, while Latham & Watkins is serving as a legal advisor. Morgan Stanley is acting as exclusive financial advisor to BeiGene.

BeiGene will spend as much as $1.25 billion on the development program. Amgen will pay royalties to BeiGene on the sales of these products outside of China, with the exception of KRAS drug AMG 510.

— CNBC's Meg Tirrell contributed to this report.