In view of the low convergence accuracy, slow convergence speed and easy to fall into local optimum of standard whale algorithm, a whale optimization algorithm based on nonlinear adjustment and random walk strategy (NWOA) is proposed. Based on the exponential function of the maximum fitness value, average fitness value, minimum fitness value and random factor of the population, a strategy adjusting the inertia weight nonlinearly is designed to improve the convergence speed and optimization accuracy of the algorithm. In addition, a nonlinear adjustment convergence factor strategy is used to balance the global search and local development capabilities of the algorithm. A search strategy based on random walk is designed to help the algorithm jump out of the local optimum and improve the local search ability. Through 12 benchmark functions solving, the experimental results show that NWOA algorithm has significantly improved the convergence speed and optimization accuracy, and solved the problem that the algorithm is easy to fall into local optimization in multimodal functions. Thus compared with other swarm intelligence algorithms, NWOA algorithm shows better optimization performance. © 2022, Taiwan Ubiquitous Information CO LTD. All rights reserved.