Seagull optimization algorithm (SOA) inspired by the migration and attack behavior of seagulls in nature is used to solve the global optimization problem. However, like other well-known metaheuristic algorithms, SOA has low computational accuracy and premature convergence. Therefore, in the current work, these problems are solved by proposing the modified version of SOA. This paper proposes a novel hybrid algorithm, called whale optimization with seagull algorithm (WSOA), for solving global optimization problems. The main reason is that the spiral attack prey of seagulls is very similar to the predation behavior of whale bubble net, and the WOA has strong global search ability. Therefore, firstly, this paper combines WOA’s contraction surrounding mechanism with SOA’s spiral attack behavior to improve the calculation accuracy of SOA. Secondly, the levy flight strategy is introduced into the search formula of SOA, which can effectively avoid premature convergence of algorithms and balance exploration and exploitation among algorithms more effectively. In order to evaluate the effectiveness of solving global optimization problems, 25 benchmark test functions are tested, and WSOA is compared with seven famous metaheuristic algorithms. Statistical analysis and results comparison show that WSOA has obvious advantages compared with other algorithms. Finally, four engineering examples are tested with the proposed algorithm, and the effectiveness and feasibility of WSOA are verified.