Research on Unmanned Aerial Vehicle (UAV) path planning is crucial for enhancing autonomous flight capabilities. Bioinspired heuristic algorithms have been proven to effectively solve such complex problems. The heuristic algorithm selected in this paper is the Sparrow Search Algorithm. However, due to the limitations of this original algorithm, i.e., the inclination to become trapped in local optima, low search accuracy, and insufficient population diversity, improvements are necessary. To address these shortcomings, this paper introduces the Improved Tent Chaotic Mapping, Opposite-Based Learning strategy (OBL), Gaussian-Cauchy mutation mechanism, and Adaptive adjustment strategy for discoverers and joiners to improve the original algorithm. The improved algorithm is named the Chaotic Mapping Adaptive Mutation-Sparrow Search Algorithm (CMAM-SSA). This algorithm is applied to UAV path planning in MATLAB simulations, combined with a simulation environment featuring mountainous terrain modeling and threat areas. The cost function integrates external environmental constraints, UAV performance limitations, and path planning objectives. Furthermore, a six-degree-of-freedom UAV path tracker is implemented using PID control on the Simulink platform. The simulation outcomes demonstrate that the CMAM-SSA algorithm exhibits a more rapid convergence rate and superior accuracy, affirming its effectiveness and superiority. The excellent performance of the Simulink path tracker provides further validation for the proposed improvements.