This paper describes a grid-connected photovoltaic (PV) system with the function of active power filter (APF), in which a Z-source network is employed to boost the DC bus voltage during periods when the PV array output is low. After modeling the Z-source network and H-bridge converter, a state space model of Z-source inverter is derived. The model reflects the fact that the Z-source inverter has two independent control variables: shoot-through duty d0 and modulation index m. The output variables can be controlled directly through these two variables. Using this model, a control strategy is developed with two control loops (Z-source voltage control loop and reference current control loop) to realize the proposed functionality. The reference current containing PV maximum power and harmonic components is developed based on instantaneous p-q theory via a proportional-integral (PI) controller. The resulting system delivers grid-connected generation from a PV system alongside the provision of harmonics suppression and reactive power compensation.