This paper presents the method to solve the problem of path planning for an unmanned aerial vehicle (UAV) in adversarial environments including radar-guided surface-to-air missiles (SAMs) and unknown threats. SAM lethal envelope and radar detection for SAM threats and line-of-sight (LOS) calculation for unknown threats are considered to compute the cost for path planning. In particular, dynamic SAM lethal envelope is taken into account for path planning in that SAM lethal envelope does change its direction according to the flight direction of UAV. In addition, terrain masking, nonisotropic radar cross section (RCS), and dynamic constraints of UAV are considered to determine the cost of the path. An improved particle swarm optimization (PSO) algorithm is proposed for finding an optimal path. The proposed algorithm is composed of preprocessing steps, multi-swarm PSO algorithm, and postprocessing steps. The Voronoi diagram and Dijkstra algorithm as preprocessing steps provide the initial path for the multi-swarm PSO algorithm which uses multiple swarms with sub-swarms for the balance between exploration and exploitation. Postprocessing steps include waypoint insertion and 3D path smoothing. The computation time is reduced by using the map generation, the coordinate transformation, and the graphic processing unit (GPU) implementation of the algorithm. Various simulations are carried out to compare the performance of the proposed method according to the number of iterations, the number of swarms, and the number of cost evaluation points. The t-test results show that the suggested method is statistically better than existing methods.