Aiming at mitigating the fluctuation of distributed photovoltaic power generation, a segmented compensation strategy based on the improved seagull algorithm is proposed in this paper. In this regard, a hybrid energy storage system comprising a lithium battery and supercapacitor is utilized. The internal power distribution of the hybrid energy storage system is adjusted using wavelet packet decomposition, and the state of charge is employed to adapt the primary power distribution. The start and end times for charging and discharging are determined by combining the time of use, electricity price, state-of-charge information, and load size at night to realize the economic operation of the system. The opposing search operator strategy and mutation operation are used to improve the seagull algorithm, optimize the controller parameters of the DC/DC converter, and improve its response time. Combined with the historical measured data of a distributed photovoltaic in Hubei Province, simulation results show that the proposed strategy can effectively smoothen the fluctuation of distributed photovoltaic generated power while reducing the charging and discharging frequencies of the energy storage system, hence improving its stability and service life.