Battery energy storage system (BESS) plays an important role in enhancing system flexibility, stability, and reliability of the power grid. This paper proposes a fully distributed two-level control strategy of the grid-connected inverters for BESSs. The upper-level control determines the charging/discharging power references for the BESS units according to the state of charge levels and the supply demand balance among intermittent distributed generations and time-varying load demands. The lower-level control adopts the proposed discrete robust control algorithm which enables the BESS to track the power references accurately. The uncertainty and disturbance are estimated by the disturbance estimation technique and the chattering problem is alleviated by introducing a saturation function. The convergence and stability of the proposed distributed control strategy are guaranteed through rigorous analysis and the effectiveness is validated by simulation results.