Metal bellows are widely used as its many advantages. However, in the process of welding, the welding quality and welding speed is affected by the operators' ability very much. For this, This automatic welding system based upon on-machine laser measurement is developed for the bellows in the large transformer cooling system. This system is composed of a laser profilometer, the motion control system and the mechanical parts, etc. On-machine measurement is conducted on the axial cross sections of the bellows using the laser profilometer, and the accurate coordinates of the welds in radial and axial directions are obtained by calculating after denosing, smoothing and interpolation on the points of the measured profiles. After that coordinates' data was delivered to the motion control card. Automatic welding was achieved by its control of welding torch moving along with the 2D platform that ensures the precise relative position of the welding torch and the welds. Experiments show that this system increases the quality and efficiency effectively and decreases the working intensity of the workers.