In response to the limitations of the traditional Sand Cat Swarm Optimization(SCSO) algorithm, including inadequate global search capability and susceptibility to local optima, an improved Sand Cat Swarm Optimization (LVSCSO) algorithm is proposed. The proposed algorithm introduces a nonlinear adjustment mechanism to better encapsulate the search and attack processes inherent in SCSO algorithm. Moreover, an adaptive Levy flight mechanism is incorporated to effectively enhance the algorithm’s global search capability and capacity to escape local optima. A grid-based approach is used to establish the wilderness and complex urban environment models for unmanned aerial vehicles(UAVs). A composite fitness function, considering the factors such as path length, flight altitude, and flight angles, serves as the evaluation metric. The algorithm is validated through simulation.The results show that, in the wilderness environment model, the improved algorithm achieves the enhancements of 56.40% and 22.06% over the traditional SCSO algorithm and the particle swarm optimization algorithm, respectively. In the complex urban environment model, the improvements are 56.33% and 61.80% compared to the traditional SCSO algorithm and the particle swarm algorithm, respectively. These findings highlight the efficacy and superiority of the improved SCSO algorithm in the context of path planning.