The path planning problem is that Unmanned aerial vehicle (UAV) needs to plan a feasible path from the starting point to the end point in a specific environment. But it cannot get satisfactory results using ordinary algorithms, to solve this problem, a hybrid algorithm named as PESSA is proposed, where particle swarm optimization (PSO) and an enhanced sparrow search algorithm (ESSA) work in parallel. In the ESSA, the random jump of the producer’s position is strengthened to guarantee the global search ability, each scrounger keeps learning from the optimal experience of the producers, and for the sparrow with the optimal position, when it perceives the danger, the difference between the best individual and the worst individual will be imposed to speed up the search process. And then, the elite reverse search strategy was added to increase the diversity of the population. In this paper, the performance of PESSA is verified by 10 basic functions, the experimental results illustrate that PESSA is better compared with other twelve algorithms. Finally, the proposed PESSA is applied in 4 different scenarios including two groups of 2D environments and two groups of 3D environments. The results show that the PESSA algorithm can acquire more feasible and effective route than compared algorithms.