Wind power have the characteristic of generation output variability. To reduce the impact of power fluctuations on grids and improve the power quality of power system, this paper puts forward the capacity optimization configuration of hybrid energy storage system for smoothing wind power fluctuation. The paper adopts moving-average method to filter the fluctuation of power and smooth wind power. The window length of moving-average method will affect the smoothing effect of power and the capacity configuration of hybrid energy storage system, so we consider the fluctuation limit of grid power as constraints to determine the window length, then achieve its optimal choice. We use the method of spectrum analysis to decompose the fluctuation of wind power, and take the minimum annual comprehensive cost as the objective function to determine the compensation frequency bands of the super capacitor and the battery respectively, and then determine the charge and discharge power. Finally, we establish a cost model of hybrid energy storage system considering battery life loss, and verify the feasibility and economic superiority of the program through case analysis.