Multiple battery energy storage systems (BESSs) are used to compensate for the fluctuation in wind generations effectively. The stage of charge (SOC) of BESSs might be unbalanced due to the difference of wind speed, initial SOCs, line impedances and capabilities of BESSs, which have a negative impact on the operation of the wind farm. This paper proposes a distributed control of the wind energy conversion system (WECS) based on dynamic average consensus algorithm to balance the SOC of the BESSs in a wind farm. There are three controllers in the WECS with integrated BESS, including a machine-side controller (MSC), the grid-side controller (GSC) and battery-side controller (BSC). The MSC regulates the generator speed to capture maximum wind power. Since the BSC maintains the DC link voltage of the back-to-back (BTB) converter that is used in the WECS, an improved virtual synchronous generator (VSG) based on consensus algorithm is used for the GSC to control the output power of the WECS. The functionalities of the improved VSG are designed to compensate for the wind power fluctuation and imbalance of SOC among BESSs. The average value of SOCs obtained by the dynamic consensus algorithm is used to adjust the wind power output for balancing the SOC of batteries. With the proposed controller, the fluctuation in the output power of wind generation is reduced, and the SOCs of BESSs are maintained equally. The effectiveness of the proposed control strategy is validated through the simulation by using a MATLAB/Simulink environment.