Investor Warren Buffett is helping finance Burger King Worldwide Inc.'s planned takeover of Canadian coffee-and-doughnut chain Tim Hortons Inc., according to people familiar with the matter, in a surprise twist that thrusts the billionaire into a debate over U.S. taxes.

Mr. Buffett's Berkshire Hathaway Inc. would invest in the deal in the form of preferred shares, some of the people said. Berkshire is expected to provide about 25% of the deal's financing, one of the people said. The exact structure of Mr. Buffett's participation...