At present, it needs to build VORONOI map or set the navigation nodes for getting optimal UAV,two-dimensional path planning by adopting ACO algorithm. A new structure herein of ACO can automatically search flight path. Two construction difficulties were solved. First, path node was not fixed,that is to say it was not a simple combinatorial optimization problem. Second, it was difficult for local search to reach the destination node. And a guidance factor was included into the state transition strategy, and it can reduce the blindness of local search and ensure ants to reach the destination node. In addition, pheromone was updated just for the optimal flight path, and by setting pheromones limits between the upper and lower, it can improve the searching speed, and prevent the algorithm into a local optimum. Simulation results show that the algorithm structure is very reasonable and in the absence of navigation nodes and VORONOI map, the ants automatically seek to the target node, and the convergence speed is quick.