The protection of plants in mountainous and hilly areas differs from that in plain areas due to the complex terrain, which divides the work plot into many narrow plots. When designing the path planning method for plant protection UAVs, it is important to consider the generality in different working environments. To address issues such as poor path optimization, long operation time, and excessive iterations required by traditional swarm intelligence algorithms, this paper proposes a bionic three-dimensional path planning algorithm for plant protection UAVs. This algorithm aims to plan safe and optimal flight paths between work plots obstructed by multiple obstacle areas. Inspired by krill group behavior and based on group intelligence algorithm theory, the bionic three-dimensional path planning algorithm consists of three states: “foraging behavior”, “avoiding enemy behavior”, and “cruising behavior”. The current position information of the UAV in the working environment is used to switch between these states, and the optimal path is found after several iterations, which realizes the adaptive global and local convergence of the track planning, and improves the convergence speed and accuracy of the algorithm. The optimal flight path is obtained by smoothing using a third-order B-spline curve. Three sets of comparative simulation experiments are designed to verify the performance of this proposed algorithm. The results show that the bionic swarm intelligence algorithm based on krill swarm behavior reduces the path length by 1.1~17.5%, the operation time by 27.56~75.15%, the path energy consumption by 13.91~27.35%, and the number of iterations by 46~75% compared with the existing algorithms. The proposed algorithm can shorten the distance of the planned path more effectively, improve the real-time performance, and reduce the energy consumption.