McDonald’s Corp. said it has fired Chief Executive Steve Easterbrook because of his consensual relationship with an employee, the latest challenge for the company as it races to keep up with changes reverberating throughout the food industry.

The burger giant said Sunday that its board voted Friday to terminate Mr. Easterbrook after investigating his relationship with the unnamed employee. Mr. Easterbrook resigned from McDonald’s board as well. He wrote in an email to McDonald’s employees on Sunday that he had violated company...