The application of an inverter is becoming more and more widespread in the surface-mounted permanent-magnet synchronous motor (SMPMSM). A large number of voltage harmonics can be generated by the inverter. The electromagnetic torque, loss, and air-gap magnetic density of the SMPMSM are affected by voltage harmonic. To analyze its influence, taking a 3 kW 1500 r/min SMPMSM as an example, a two-dimensional transient electromagnetic field model is established. The correctness of the model is verified by comparing the experimental data with the calculated data. Firstly, the finite element method is used to calculate the electromagnetic field of the SMPMSM, and the performance parameters of the SMPMSM are obtained. Based on these parameters, the influence of voltage harmonic on motor performance is analyzed quantitatively. Secondly, the influence of the voltage harmonic on the air-gap magnetic field is analyzed, and the influence degree of the time harmonic on the air-gap magnetic field is determined. At the same time, torque ripple, average torque, and loss are studied when the different harmonics orders, amplitudes, and phase angles are contained in voltage, and the variation is obtained. Finally, the variation mechanism of eddy current loss is revealed. The conclusion of this paper provides reliable theoretical guidance for improving motor performance.