Google is trying to quell the debates roiling its workforce by setting new internal rules designed to limit offensive language and personal attacks against fellow employees.

In a set of guidelines sent to employees, Google said it would discipline anyone who discriminates against or attacks colleagues or engages in discussions that are “disruptive to a productive work environment,” according to a copy of the guidelines reviewed by The Wall Street Journal.

The...