Optimal allocation of water resources can solve the problems of regional water resources shortage and unreasonable utilization, and in recent years optimization algorithms have become an important tool for obtaining the results of optimal allocation of water resources. To effectively alleviate the problems of slow convergence, local optimization and prematureness in existing optimal allocation algorithms, this paper introduces a new metaheuristic algorithm: the Cheetah Optimizer (CO), with the advantages of fast convergence, robustness, and superiority-seeking ability, which is applied to the optimal allocation of water resources. Taking Taiyuan as the study area, this paper establishes a water resource optimization model with the objectives of economic, social, and ecological benefits, and CO is used to solve the model, then compares and analyzes the results with the Genetic Algorithm (GA). The results show that the total pollutant discharge of CO is within the control target of the planning year (2030), the regional satisfaction reaches 0.98, which can meet the demand for basic and development water; compared with the current year (2020), the proportion of domestic water consumption decreases by 22.58%, and the proportion of water consumption in production increases by 10.53%, 25.81% and 12.5%, respectively. The water supply ratio of surface water and groundwater is reduced by 21.70% and 11.14%, respectively, the water supply ratio of reuse water and yellow diversion water is increased by 5.43% and 27.40%. It accords with the idea of water resources allocation in Taiyuan, and verifies the effectiveness of CO. Compared with GA, CO has increased regional satisfaction, integrated water value and water distribution equity by 7.10%, 3.57% and 56.52%, respectively, reduced pollutant emissions and water shortage by 3.11% and 3.85%, at the same time, it has better coordination, which verifies the superiority of the CO. The results show that CO is reasonable and feasible to solve the optimal allocation model of water resources, which can provide a new method for solving the optimal allocation model of water resources. [ABSTRACT FROM AUTHOR]