A three-phase four-leg inverter-based shunt active power filter (APF) is proposed to compensate three-phase unbalanced currents under unbalanced load conditions in grid-connected operation in this study. Since a DC-link capacitor is required on the DC side of the APF to release or absorb the instantaneous apparent power, the regulation control of the DC-link voltage of the APF is important especially under load variation. In order to improve the regulation control of the DC-link voltage of the shunt APF under variation of three-phase unbalanced load and to compensate the three-phase unbalanced currents effectively, a novel Petri probabilistic fuzzy neural network (PPFNN) controller is proposed to replace the traditional proportional-integral (PI) controller in this study. Furthermore, the network structure and online learning algorithms of the proposed PPFNN are represented in detail. Finally, the effectiveness of the three-phase four-leg inverter-based shunt APF with the proposed PPFNN controller for the regulation of the DC-link voltage and compensation of the three-phase unbalanced current has been demonstrated by some experimental results.