A high precision, rapid and automatic high-voltage capacitor charging system is needed for pulse power system. A charging system based on high-voltage capacitor bank as energy storage device and c8051f020 MCU as control system, is designed in this paper .The hardware of this system includes a voltage measurement and control circuit, operation and display screen circuit, optical coupling circuit, fiber optical transceiver circuit. The software of this system uses closed-loop control algorithm to control the motor of voltage regulator, and the voltage of high voltage capacitor is charged from 0 to 20KV. By analyzing for the data of experimental and adopt the method of curve fitting, a modified voltage control algorithm is established. The modified algorithm improves the accuracy of charged voltage for high voltage capacitor to more than 99%.