Limited by the insufficiency of single UAV’s load and flight time capabilities, the multi-UAV (unmanned aerial vehicle) collaboration to improve mission efficiency and expand mission functions has become the focus of current UAV theory and application research. In this paper, the research on UAV global path planning is carried out using the ant colony algorithm, and an indoor UAV path planning model based on the ant colony algorithm is constructed. In order to improve the efficiency of the algorithm, enhance the adaptability and robustness of the algorithm, a distributed path planning algorithm based on the dual decomposition UAV communication chain is proposed. This algorithm improves the basic ant colony algorithm from the aspects of path selection, pheromone update, and rollback strategy in view of the inherent shortcomings of the ant colony algorithm. In order to achieve the best performance of the algorithm, this paper analyzes each parameter in the ant colony algorithm in depth and obtains the optimal combination of parameters. The construction method of the Voronoi diagram was improved, and the method was simulated to verify that the method can obtain a Voronoi diagram path that is safer than the original method under certain time conditions. Through the principle analysis and simulation verification of the Dijkstra algorithm and the dual decomposition ant colony algorithm, it is concluded that the dual decomposition ant colony algorithm is more efficient in pathfinding. Finally, through simulation, it was verified that the dual decomposition ant colony algorithm can plan a safe and reasonable flight path for multiple UAV formation flights in an offline state and achieve offline global obstacle avoidance for multiple UAVs.