In order to improve the machining precision of the magnetic suspension spindle which is usually installed on machine tool or other elastic structures, and to minimize the effects of machine vibration, the complex magnetic suspension electromechanical coupling system was studied. The design variables, objective functions and constraint condition of coupling system were determined. The optimized program was worked out based on genetic algorithm in VC 6.0 environment and the optimum PID control parameters satisfying static and dynamic machining precision of the magnetic suspension spindle were obtained. The unit sinusoidal response, dynamic flexibility and static flexibility of the coupling system were analyzed. The analysis results show that the dynamic and static characters of the coupling system after optimization have been raised obviously than that before optimization. The adverse effect brought by machine vibration could be reduced by optimizing the PID control parameters of complex magnetic suspension electromechanical coupling system, and the machining precision of the magnetic suspension spindle unit can be improved.