In recent years, optimization problems have received extensive attention from researchers, and metaheuristic algorithms have been proposed and applied to solve complex optimization problems. The wild horse optimizer (WHO) is a new metaheuristic algorithm based on the social behavior of wild horses. Compared with the popular metaheuristic algorithms, it has excellent performance in solving engineering problems. However, it still suffers from the problem of insufficient convergence accuracy and low exploration ability. This article presents an improved wild horse optimizer (I-WHO) with early warning and competition mechanisms to enhance the performance of the algorithm, which incorporates three strategies. First, the random operator is introduced to improve the adaptive parameters and the search accuracy of the algorithm. Second, an early warning strategy is proposed to improve the position update formula and increase the population diversity during grazing. Third, a competition selection mechanism is added, and the search agent position formula is updated to enhance the search accuracy of the multimodal search at the exploitation stage of the algorithm. In this article, 25 benchmark functions (Dim = 30, 60, 90, and 500) are tested, and the complexity of the I-WHO algorithm is analyzed. Meanwhile, it is compared with six popular metaheuristic algorithms, and it is verified by the Wilcoxon signed-rank test and four real-world engineering problems. The experimental results show that I-WHO has significantly improved search accuracy, showing preferable superiority and stability.