The purpose is to apply intelligent algorithm to the field of robot and improve the efficiency of robot path planning. First, ant colony algorithm in intelligent algorithm is expounded theoretically and computationally. On this basis, common particle swarm optimization algorithm is improved, and the improved ant colony algorithm calculation process is proposed. Finally, the simulation experiment of the robot with mechanical arm is carried out by Matrix Laboratory (MATLAB) software. The results show that the common ant colony algorithm can find the optimal path after 45 iterations, while the improved ant colony algorithm can find the optimal path after 25 iterations, which has faster convergence speed and shorter path length. There is a certain error between the actual trajectory of the mechanical arm on X-Y axis, X-Z axis, Y-Z axis and X-Y-Z axis and the ideal trajectory planned by the algorithm, and the error is about 2mm. Under random terrain conditions and U-shaped obstacle terrain conditions, the robot path planning result based on the improved ant colony algorithm is the shortest and the condition is the best; however, the robot path under the improved ant colony algorithm is reduced by about 3cm and 13cm compared with the common ant colony algorithm, and the optimal iteration times are reduced by 20 and 38 times, respectively. It shows that the improved ant colony algorithm can make the robot with mechanical arm explore the optimal and shortest path in a short time. Although there are some errors between the trajectory of the mechanical arm with the ideal trajectory, the errors are in the controllable range, that is, the improved ant colony algorithm has high efficiency.