Hasbro Inc. is in early talks to buy DreamWorks Animation SKG Inc. in a deal that would bring an animation studio that just recently began diversifying beyond the big screen under the fold of a major toy maker, according to people familiar with the matter.

A combination of the two companies could accelerate efforts at each to move beyond their core businesses. DreamWorks Animation has expanded into consumer products in recent years but lags behind Walt Disney Co., and Hasbro had just changed tack on its entertainment business,...