Aiming at the problem of assembly sequence planning of servo motor components, a method based on particle swarm algorithm to optimize the assembly sequence of servo motor components is proposed according to the characteristics of the assembly problem. This method redefines the related operations of velocity and position in particle swarm optimization. This paper evaluates the assembly sequence in terms of geometric feasibility and factors affecting the assembly process. The geometric interference information of the part is expressed by establishing the interference matrix. The objective function with the assembly tool and assembly direction as the evaluation index is established. Finally, the objective function is combined with the particle swarm algorithm, and the optimal assembly sequence of the servo motor components is obtained, which proves the effectiveness of the method.