The path planning is one core aspect of the research of robotics. In order to solve the problem that the welding robot path planning in the production line of BIW is inefficient, this paper analyzes the problem of the welding robot path planning and abstracts it into the TSP model. Finally, the optimal welding path is calculated using Ant Colony Optimization (ACO) based on the MATLAB7.0 environment. The result shows that this algorithm is an accurate and effective tool for welding path planning.