In space gravitational wave detection, various physical effects in the spacecraft, such as self-gravity, electricity, and magnetism, will introduce undesirable parasitic stiffness. The coupling noise between stiffness and the motion states of the test mass critically affects the performance of scientific detection, making accurate stiffness identification crucial. In response to the question, this paper proposes a method to optimize the test mass motion state for enhancing stiffness identification performance. First, the dynamics of the test mass are studied and a recursive least squares algorithm is applied for the implementation of on-orbit stiffness identification. Then, the motion state of the test mass is parametrically characterized by multi-frequency sinusoidal signals as the variable to be optimized, with the optimization objectives and constraints of stiffness identification defined based on convergence time, convergence accuracy, and engineering requirements. To tackle the dual-objective, computationally expensive nature of the problem, a multigranularity surrogate-assisted evolutionary algorithm with individual progressive constraints (MGSAEA-IPC) is proposed. A fuzzy radial basis function neural network PID (FRBF-PID) controller is also designed to address complex control needs under varying motion states. Numerical simulations demonstrate that the convergence time after optimization is less than 2 min, and the convergence accuracy is less than 1.5 × 10−10 s−2. This study can provide ideas and design references for subsequent related identification and control missions.