Aiming at the task completion and parameters optimization of modular robot when single joint failed, a fault-tolerant trajectory optimization method is proposed in this paper. At first, three fault tolerance performance functions are proposed based on the assessment of joint velocity jumps in different viewpoints. Then, the path planning method using the gradient of the manipulability is introduced based on the self-motion manifolds. On the basis, the trajectory optimization problem is turned into finding the suitable adjustment coefficient of path planning method to minimize the performance functions. Next, taking the performance functions as optimal objective separately, the performance function is minimized via searching the global optimal coefficient by using particle swarm optimization (PSO) algorithm. Finally, simulations for 8 degree of freedom (DOF) modular robot are performed, by which the effectiveness of trajectory optimization is validated. By analyzing the simulation results, the effects of different performance functions are discussed in depth.