The companies issued a statement saying their boards of directors unanimously approved the deal, which calls for Amgen to acquire all outstanding shares of Onyx stick for $125 per share in cash.
The announcement came two months after Onyx rejected Amgen's unsolicited offer of $120 a share and began soliciting other offers, the Los Angeles Times reported.
Onyx has become a desirable takeover target due to its development of Kyprolis, which has been approved by the U.S. Food and Drug Administration for treatment of some multiple-myeloma patients, the Times said.
"We believe that Amgen is strongly positioned to realize the full potential of Onyx's portfolio and pipeline for the benefit of physicians and patients," Amgen Chairman and Chief Executive Robert A. Bradway said.
"Amgen has a unique opportunity to add value to Kyprolis, a product which is at an early and promising stage of its launch," Bradway said.
Amgen -- based in Thousand Oaks, Calif. -- reported annual revenue of $17.3 billion and net income of $4.3 billion in 2012, the newspaper said. Its best-selling products include the arthritis medication Enbrel and the osteoporosis drug Prolia.
Onyx, based in San Francisco, reported revenue of $362.2 million and a net loss of $187.8 million last year.
Kyprolis is undergoing clinical trials in Europe.
Amgen said in the release it expects the acquisition to close later this year, provided regulators approve it.
The acquisition is the first big takeover for Bradway, who became Amgen chief executive in May 2012, The New York Times said.
Notable deaths of 2014 [PHOTOS]