U.S. product-safety officials announced a recall affecting 2.8 million Samsung Electronics Co. washing machines, in another stain on the company’s reputation already following the botched Galaxy Note 7 phone recall.

The Consumer Product Safety Commission said the tops can detach during use. The company has received more than 700 reports of incidents and nine reports of injuries including a broken jaw, the agency said Friday.

The...