Unmanned aerial vehicles (UAVs) require pre-planned flight paths that are energy-efficient, safe and smooth across their wide range of application scenarios. In this study, a novel UAV path planning method is proposed. Firstly, the UAV path planning under numerous obstacles is modeled as a continuous constrained optimization problem. The cost function is formulated as a linear combination of length, height variation, and smoothness, while the constraints include obstacle avoidance, height limitation, and the maneuverability of UAV. Subsequently, a novel constrained state transition algorithm with adaptive fuzzy penalty (AFSTA) is proposed to solve the optimization problem. In AFSTA, a novel adaptive fuzzy penalty function is designed to leverage expert knowledge to establish a reasonable mapping relationship from the fitness value and the degree of constraint violation to the penalty factor for a candidate solution. Meanwhile, the state transition algorithm (STA) is used as the search engine for both global and local search. Experimental results illustrate that the proposed method can find energy-efficient, safe, and maneuverable flight paths successfully with the superiority over other state-of-the-art metaheuristic algorithms.