The arc weld seam is a common form in ship medium-small assemblies. In order to reduce the deformation of the welded parts with an arc weld seam, and then improve the welding quality, research on the optimization of welding sequences based on the artificial immune algorithm is carried out in this paper. First, the formation mechanism of welding deformation is analyzed by the thermo-elastic-plastic finite element method; next, the reduction in the welding deformation is taken as the optimization goal, and the welding sequence optimization model for the arc weld seam is constructed under the condition of boundary constraints; then, an immune clonal optimization algorithm based on similar antibody similarity screening and steady-state adjustment is proposed, and its welding sequence optimization ability is improved through antibody screening and median adjustment. Finally, the welding sequence optimization tests are carried out based on the Ansys platform. Numerical tests of a typical arc weld seam show that different welding sequences will cause different welding deformations, which verifies the importance of welding sequence optimization. Furthermore, the numerical test results of four different types of welds in ship medium-small assemblies demonstrated that the use of distributed optimization algorithms for welding sequence optimization can help reduce the amount of welding deformations, and the immune clonal algorithm, based on antibody similarity screening and steady-state adjustment, achieves the optimal combination of the welding sequence. Compared with the other three optimization algorithms, the maximum welding deformation caused by the welding sequence optimized by the proposed immune clonal algorithm is reduced by 3.1%, 4.0%, and 3.4%, respectively, the average maximum welding deformation is reduced by 3.5%, 5.5%, and 4.7%, respectively, and the convergence generation of the optimization algorithm is reduced by 16.8%, 13.1% and 14.5%, respectively, which further verifies the effectiveness and superiority of the proposed immune clonal algorithm in the optimization of welding sequences.