Due to the nonlinearity and dead time of the inverter, a great number of harmonic components is introduced into the motor input current, causing the torque ripple of the motor. The paper aims to suppress the torque ripple of a low-speed and high-torque permanent magnet synchronous motor (PMSM) with a two-step stator voltage optimization method, including a high precision harmonic voltage injection (HPHVC) method and a deep belief network (DBN)-deep neural network (DNN) voltage prediction model. Firstly, a closed-loop harmonic current detection system with Type-II Chebyshev filter is adopted to enhance the harmonic current extraction accuracy. Secondly, a harmonic voltage algorithm is designed considering the dq-axis current coupling relationship, which improves the accuracy of harmonic voltage calculation. Thirdly, a dq-axis voltage prediction model is constructed using DBN-DNN algorithm as the surrogate model, which further reduces the current harmonic components caused by the harmonic injection structure and the PI control algorithm, reduces the torque pulsation of the motor, and boosts the dynamic performance of the motor. Finally, the experimental platform is constructed by embedding the proposed strategy into the field oriented control system for reducing the torque pulsation. The experimental results verify the proposed strategy.