Coke will make a net cash payment of $2.15 billion to Monster, whose shares spiked as much as 36 percent in after-hours trading. Coke shares rose 1.3 percent.
"They're both winners in this one. Coke certainly needs growth and its own energy brands ... have really been nonstarters around the world," said Bill Chappell, a managing director at SunTrust Robinson Humphrey, in a CNBC interview.
Monster "has been gaining share very quickly and hitting the ground running. So it's a nice shot in the arm to Coke and its distributors."
Under terms of the deal, Coke will transfer its energy drink businesses, including NOS and Burn, to Monster. In turn, Monster will transfer its non-energy businesses to Coke, including Hansen's Natural Sodas.
Coke will get two seats on Monster's board.
Read MoreCramer: Coke trolling for deals?
"Our equity investment in Monster is a capital efficient way to bolster our participation in the fast-growing and attractive global energy drinks category," Coke CEO Muhtar Kent said in a statement.
The deal is expected to close late this year or early next.