The whale optimization algorithm (WOA) is a high-performance metaheuristic algorithm that can effectively solve many practical problems and broad application prospects. However, the original algorithm has a significant improvement in space in solving speed and precision. It is easy to fall into local optimization when facing complex or high-dimensional problems. To solve these shortcomings, an elite strategy and spiral motion from moth flame optimization are utilized to enhance the original algorithm’s efficiency, called MEWOA. Using these two methods to build a more superior population, MEWOA further balances the exploration and exploitation phases and makes it easier for the algorithm to get rid of the local optimum. To show the proposed method’s performance, MEWOA is contrasted to other superior algorithms on a series of comprehensive benchmark functions and applied to practical engineering problems. The experimental data reveal that the MEWOA is better than the contrast algorithms in convergence speed and solution quality. Hence, it can be concluded that MEWOA has great potential in global optimization.