Including debt assumption, Heinz valued the transaction, which it called the largest in its industry's history, at $28 billion. Berkshire and 3G will pay $72.50 per share, a 19 per cent premium to the stock's previous all-time high.
Heinz shares actually rose slightly above the offer price in early trading, although Mr Buffett cautioned he had no intention of raising his bid.
The surprise purchase satisfies, at least in part, his hunt for growth through acquisition. He was frustrated in 2012 by the collapse of at least two deals in excess of $20 billion and said he might have to do a $30 billion deal this year to help fuel Berkshire's growth engine.
In this case, Berkshire is putting up about $12 billion to $13 billion cash, Mr Buffett told CNBC, leaving it ample room for another major transaction.
Berkshire Hathaway already has a variety of food assets, including the Dairy Queen ice cream chain, chocolatier See's Candies and the food distributor McLane. Mr Buffett, famed for a love of cheeseburgers, joked he was well acquainted with Heinz's products already and that this was "my kind of deal."
It does represent an unusual teaming of Berkshire with private equity, though; historically, Mr Buffet's purchases have been outright his own. He and 3G founder Jorge Paulo Lemann have known each other for years, and Mr Buffett said Mr Lemann approached him with the Heinz idea in December.
For 3G, a little-known firm with Brazilian roots, the purchase is something of a natural complement to its investment in fast-food chain Burger King, which it acquired in late 2010 and in which it still holds a major stake.
Mr Lemann, a globe-trotting financier with Swiss roots, made his money in banking and gained notoriety for helping to pull together the deals that ultimately formed the beer brewing giant AB InBev.
3G will be Heinz's operator after the deal closes, and the company will remain headquartered in Pittsburgh. Berkshire and 3G promised they would maintain the company's philanthropic commitments in the city.
But it was not immediately clear if CEO Bill Johnson would stay on. Only the fifth chairman in the company's history, Johnson is widely credited with Heinz's recent strong growth.
The company, known for its iconic ketchup bottles, Heinz 57 sauces as well as other brands including Ore-Ida frozen potatoes, has increased net sales for the last eight fiscal years in a row.
Heinz said the transaction would be financed with cash from Berkshire and 3G, debt rollover and debt financing from J.P. Morgan and Wells Fargo. Mr Buffett told CNBC that Berkshire and 3G would be equal equity partners.
Heinz shares soared 20 per cent, or $12.09, to $72.59 on the New York Stock Exchange.
The deal is also a potential boon for new U.S. Secretary of State John Kerry, whose wife Teresa is the widow of H.J. Heinz Co heir John Heinz. Mr Kerry's most recent financial disclosures from his time in the U.S. Senate show a position in Heinz shares of more than $1 million, although the precise size is unclear.
Copyright @ Thomson Reuters 2013