Abstract An enhanced whale optimization algorithm is introduced to address the challenges associated with the logistics distribution center location problem, aiming to overcome the traditional heuristic algorithm’s susceptibility to local optima and enhance the overall efficiency of the logistics system. This improvement involves the integration of stochastic sinusoidal inertia weights and a variational strategy to augment the global search capability and convergence accuracy of the conventional algorithm. The results of experimental simulations indicate that the upgraded whale algorithm exhibits superior computational performance compared to other heuristic algorithms. Furthermore, it demonstrates the ability to effectively compute optimal distribution center locations, thereby enhancing the delivery efficiency of the logistics distribution system.