Qualcomm Inc. is in talks to acquire NXP Semiconductors NV, a deal that likely would cost more than $30 billion and accelerate a consolidation rush in the semiconductor industry.

The companies could strike an agreement in the next two to three months, according to people familiar with the matter. As always, it is possible there won’t be one, and some of the people said Qualcomm is simultaneously exploring other deal options.

Shares...