Considering the traditional power amplifier has the disadvantage of poor reliability and flexibility, a three-level pulse-width modulation (PWM) power amplifier which is based on a novel field-programmable logic gate array (FPGA) algorithm and hardware solution is proposed. The power amplifier can provide various signals flexibly and realize rapid response of the magnetic suspension spindle in micro-electrical discharge machining (EDM). In this paper, the principle of three-level PWM amplifier with half bridge and full bridge power circuit is introduced. According to different functions, the amplifier is divided into four function modules which include PWM signal generator module, voltage signal convert module, bootstrap drive module, and power bridge module. PWM signal generator module is also divided into four sub-modules in term of a new FPGA algorithm. Voltage signals are converted by high-speed photo coupler HCPL-2630. IR2110S chips are applied to drive the half bridge and full bridge power circuits. According to Kirchhoff voltage law, when the period of PWM signals is 50 μs and the duty cycles are larger than 0.76 and 0.665, the average current of half bridge and full bridge are more than 3 and 4 A; however, the ripple of the half bridge and full bridge are still less than 0.25 and 0.2 A, this advantage is suitable for the control system of magnetic suspension spindle. Test results of the average current and ripple are close to theoretical value. The axial response frequency of the spindle can reach 125 Hz, using this power amplifier and the magnetic suspension spindle, micro EDM can be achieved in Z axis with 1.2 mm stroke.