In order to solve the problem that ant colony algorithm was easy to fall into local optimum in UAV route planning, an improved ant colony algorithm was proposed. The upper and lower limits of pheromone volatilization factor and pheromone were set to prevent ants from falling into local optimum because pheromone on short path was too high or pheromone on long path was too low. At the same time, under the influence of multiple heuristic factors, the overall length of the path was taken as an adaptive heuristic function factor to determine the state transition probability. When the path length was large, the adaptive heuristic function factor was smaller, which made the probability of ant colony choosing the path reduce. The experimental results show that the improved algorithm reduces the path length by 6.4% and the variance of the optimal path length by 85.78%, which increases the consideration of environmental integrity, shortens the path length, reduces the number of iterations, and jumps out of the local optimum. In the case of increasing environmental complexity, the algorithm can effectively provide a theoretical basis for UAV route planning and choose a better path after introducing the adaptive heuristic function factor.