A former student at Watford Grammar School pupil who went on to become McDonald's chief executive officer has left the company after breaching its policy forbidding relationships with employees.

The fast food giant said former president and CEO Steve Easterbrook demonstrated poor judgment. McDonald's forbids managers from having romantic relationships with direct or indirect employees.

The Watford FC fan, who used to captain for West Herts Cricket Club, was appointed CEO in 2015.

In an email to workers, Mr 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," Mr Easterbrook said in the email.

McDonald's board of directors voted on Mr Easterbrook's departure on Friday after conducting a thorough review.

Details of Mr Easterbrook's separation package will be released on Monday in a federal filing, according to a company spokesperson.

The board of directors named Chris Kempczinski, who recently served as president of McDonald's USA, as its new president and CEO.

Mr Kempczinski was instrumental in the development of McDonald's strategic plan and oversaw the most comprehensive transformation of the US business in McDonald's history, said Enrique Hernandez, chairman of McDonald's board, in a statement.

"Steve brought me into McDonald's and he was a patient and helpful mentor," Mr Kempczinski said, thanking him for his contributions.