Electric Spring (ES) can effectively alleviate intermittent and instability issues in distributed power generation systems. However, the control effectiveness and response time are poor under traditional control methods, which severely impacts the regulation performance of the electric spring. To address the poor stability of the traditional proportional-integral controller applied to the electric spring system, this paper presents a control strategy based on Quasi-Proportional Complex Integral (QPCI) for the electric spring. By constructing the mathematical model of ES, designing the control strategy, and conducting stability analysis, the critical load voltage can quickly stabilize to the reference value. Furthermore, to address the issue of fixed parameters in the QPCI controller, an ant colony algorithm is introduced to adjust and optimize the parameters in real-time, thereby improving the system's dynamic response. Finally, the proposed control strategy is validated through Matlab/Simulink simulations, demonstrating that it can accurately and rapidly track the set value of the critical load voltage in the ES system, exhibiting strong adaptability and stability.