In this paper, the analysis is carried out in order to optimize the dynamic distribution network. The analysis is based on the basic principles of distribution network planning technology. It summarizes the ant colony algorithm and the improved ant colony algorithm, and proposes an improved ant colony algorithm for the distribution network planning the mathematical model construction method, and finally verifying the example. The results show that the improved ant colony algorithm has more advantages than the traditional ant colony algorithm, and it is more in line with the basic principles. The digital model of the distribution network planning has been successfully implemented, and it has a good performance in the calculation examples. The application of improved ant colony algorithm to optimize the planning of dynamic distribution network can improve the quality of the planning scheme, indicating that the algorithm has higher application value.