Due to the widespread use of non-linear loads such as power electronic equipment in the marine power system, a series of harmonics are generated in the marine power grid. This paper takes the three-phase three-wire parallel active power filter (APF) as an example to analyze the factors that affect the APF's ability of outputting harmonic currents in the ship's power system, and provide a theoretical basis for the subsequent model parameter settings. Comparing the simulation of APF with Proportional Integral (PI) control and Proportional-Resonant (PR) control, the filtered total harmonic distortion (THD) rate of the grid-side current THD are reduced to 0.75% and 1.21% respectively, and the ship's power system with PR control can recover more quickly after being disturbed. The results show that the APF with PI and PR controllers can effectively compensate harmonics and improve the power quality of the ship's power system.