The combination of path planning and tracking is one of the solutions for Unmanned Aerial Vehicles (UAVs) to perform terrain following tasks.According to the terrain elevation data, the optimal flight path planning of terrain following can be transformed into a quadratic programming.The vector field method is used as the guidance strategy, the feasible vector field parameters are designed, and the path following controller is designed with the flight path angle of the aircraft as the controlled output.Simulation verifies that: 1) The planning results meet the predetermined safe altitude requirements of terrain following and aircraft maneuverability constraints;2) The proposed guidance strategy has accurate and reliable path tracking capabilities;and 3) The UAV can implement the terrain following task effectively by using the proposed method.