In this paper, a novel metaheuristic optimization algorithm, called chief executive officer election optimization algorithm (CEOA), is proposed, which is inspired by the process of electing a Chief Executive Officer (CEO) in a company. CEOA simulates three stages of electing a CEO, namely the mass-election stage, election stage and authorization stage. The list of candidates is confirmed during the mass-election stage. In the election stage, each candidate has its own public relation team, and all the employees are divided into three different groups. The loyalist group always supports the candidate of their own faction, which enhances the exploitation ability of the algorithm. The speculator group tries to seize the CEO’s position directly by taking advantage of the current candidates through a variety of behaviors, which enhance the exploration ability of the algorithm. The neutralist group takes its own interests as the priority, supports the candidate who meet its own interests by comparing the candidate teams and improves the exploitation and exploration ability of the algorithm at the same time. The final CEO is confirmed in the authorization stage. In addition, a precocity judgment rule is introduced to ensure the effectiveness and rationality of the election process and improve the ability of the algorithm to escape from the local optimal region. The performance of CEOA is evaluated through twenty-one classical test functions, twenty-nine CEC2017 test functions, six real-world engineering optimization problems and three date clustering problems. The average value, standard deviation, Friedman mean rank and Wilcoxon signed rank are used as criteria. The above experiments are compared with the well-studied and recent optimizers, such as GA, PSO, DE, EO, MPA, AEFA, SHADE, ISOS, mSSA and PO. For the twenty-one classical test functions, in both cases of function shifting and without shifting, CEOA can gain the first rank, and its performance in high-dimensional search space also outperforms other algorithms. For the twenty-nine CEC2017 test functions, CEOA gain the third rank, only slightly behind SHADE and LSHADE-SPACMA. However, in the twenty-one classical test functions without shifting, Friedman mean rank of CEOA is 2.4762, while SHADE and LSHADE-SPACMA are only 4.5952 and 6.0476, respectively. The experimental results show that CEOA outperforms most of optimizers and is competitive compared with high-performance methods. In addition, CEOA ranks first on all six constrained engineering optimization problems and has good performance on three real-life datasets clustering problems, proving its applicability on real-world optimization problems.