Evolutionary Algorithms (EAs) based Unmanned Aerial Vehicle (UAV) path planners have been extensively studied for their effectiveness and high concurrency. However, when there are many obstacles, the path can easily violate constraints during the evolutionary process. Even if a single waypoint causes a few constraint violations, the algorithm will discard these solutions. In this paper, path planning is constructed as a multi-objective optimization problem with constraints in a three-dimensional terrain scenario. To solve this problem in an effective way, this paper proposes an evolutionary algorithm based on multi-level constraint processing (ANSGA-III-PPS) to plan the shortest collision-free flight path of a gliding UAV. The proposed algorithm uses an adaptive constraint processing mechanism to improve different path constraints in a three-dimensional environment and uses an improved adaptive non-dominated sorting genetic algorithm (third edition—ANSGA-III) to enhance the algorithm’s path planning ability in a complex environment. The experimental results show that compared with the other four algorithms, ANSGA-III-PPS achieves the best solution performance. This not only validates the effect of the proposed algorithm, but also enriches and improves the research results of UAV path planning.