Google is considering folding home-automation unit Nest Labs into its hardware team, according to people familiar with the talks, reversing a major element of Google’s split two years ago into various businesses under holding company Alphabet Inc.

Nest was a pioneer in internet-connected home devices such as thermostats and home security cameras. But Amazon.com Inc. recently launched a home-security device that competes with Nest.

Making...