The control of battery energy storage systems (BESSs) plays an important role in the management of microgrids. In this paper, the problem of balancing the state-of-charge (SoC) of the networked battery units in a BESS while meeting the total charging/discharging power requirement is formulated and solved as a distributed control problem. Conditions on the communication topology among the battery units are established under which a control law is designed for each battery unit to solve the control problem based on distributed average reference power estimators and distributed average unit state estimators. Two types of estimators are proposed. One achieves asymptotic estimation and the other achieves finite time estimation. We show that, under the proposed control laws, SoC balancing of all battery units is achieved and the total charging/discharging power of the BESS tracks the desired power. A simulation example is shown to verify the theoretical results.