Chief Executive Matthew Murphy, who took the top job a year ago, has been focusing on Marvell's networking business to counteract declining demand for its chips used in hard disk drives of personal computers.
The acquisition will expands Marvell's portfolio and combine it with Cavium's portfolio.
Cavium's stock soared 7.4% in pre-market trading on the news, while Marvell shares climbed 1%.
With the buyout of its rival, the chipmaker will be able to diversify away from its traditional storage devices business following an agreement with Starboard Value a year ago to accept three new directors nominated by the activist hedge fund to its board. Cavium's portfolio includes multi-core processors, ARM server processors, data center switches and ethernet adapters.
"This is an exciting combination of two very complementary companies that together equal more than the sum of their parts", said Marvell President and CEO Matt Murphy.More news: Tracking rain chances and colder weather for Saturday
More news: LaVar Ball Dismisses Trump's Role in Son's Release From China
More news: CBS's Major Garrett: Why hasn't Trump sued his sexual misconduct accusers?
In the last two years, the chip industry has witnessed a series of deals as companies try to gain market share in emerging areas such as automotive technologies and connectivity.
The buyer will pay $40 in cash plus 2.1757 Marvell common shares for each Cavium share, according to a statement on November 20.
Under the deal, Marvell will offer $40.00 per share in cash and 2.1757 of its shares for each Cavium share.
Earlier this month, chipmaker Qualcomm rejected rival Broadcom $103bn takeover bid, one of the biggest ever in technology dealmaking.
Intel now dominates the server market, but the combined Marvell-Cavium company will be better suited to take on the giant chipmaker than Cavium alone.
Marvell has obtained a $850 million bridge loan commitment and a $900 million committed term loan from Goldman Sachs Group Inc. and Bank of America Corp.