The fast food giant said former president and CEO Steve Easterbrook demonstrated poor judgment, and that McDonald's forbids managers from having romantic relationships with direct or indirect subordinates.
In an email to employees, Easterbrook acknowledged he had a relationship with an employee and said it was a mistake.
"Given the values of the company, I agree with the board that it is time for me to move on," Easterbrook said in the email.
McDonald's board of directors voted on Easterbrook's departure Friday after conducting a thorough review. Details of Easterbrook's separation package will be released Monday in a federal filing, according to a company spokesman. He will also be leaving the company's board. Easterbrook was CEO since 2015.
McDonald's would not provide details about the employee with whom Easterbrook was involved, and an attorney for Easterbrook declined to answer questions.
The board of directors named Chris Kempczinski, who recently served as president of McDonald's USA, as its new president and CEO.
Two weeks ago, McDonald's reported a 2% drop in net income for the third quarter as it spent heavily on store remodeling and expanded delivery service. The company's share price has dropped 7.5% since, though it's still up 9.2% for the year. The burger chain also has been plagued by declining restaurant traffic.
The leadership transition is unrelated to the company's operational or financial performance, the company said in a news release.
McDonald's decision to act may be a sign of progress on workplace issues that have come to light in the #MeToo era, said Carl Tobias, a law professor at the University of Richmond.
"Other companies don't always act on that kind of information or fire their CEO for that, and so it seems like they trying to enforce a pretty strict policy in this situation," Tobias said.
Among other challenges at its restaurants, McDonald's has faced workplace harassment charges. In May, McDonald's said it was enhancing training and offering a new hotline for workers after a labor group filed dozens of sexual harassment charges against the company.
Fight for $15, the group which filed the charges, said McDonald's response to its sexual harassment complaints has been inadequate, and "the company needs to be completely transparent about Easterbrook's firing and any other executive departures related to these issues."
Kempczinski joined McDonald's in 2015. He was responsible for approximately 14,000 McDonald's restaurants in the U.S. He was instrumental in the development of McDonald's strategic plan and oversaw the most comprehensive transformation of the U.S. business in McDonald's history, said Enrique Hernandez, chairman of McDonald's board, in a statement.
Kempczinski described Easterbrook as a mentor.