General Motors Co. agreed to pay a $35 million fine to settle a U.S. auto-safety investigation that found GM had schemed to keep secret its information on faulty ignition switches installed on 2.6 million vehicles.

U.S. regulators for the first time disclosed details of the probe, including revealing that the Detroit company had coached workers against using “defect” and “Corvair-like” in communications. They…