This paper presents a novel power flow problem formulation for hierarchically controlled battery energy storage systems in islanded microgrids. The formulation considers droop-based primary control, and proportional–integral secondary control for frequency and voltage restoration. Several case studies are presented where different operation conditions are selected to highlight the battery formulation reliability and its necessity for detailed power flow analysis. Furthermore, the case studies consider wind-based generation units with power curves, probability-based wind distributions, and load profiles. The results obtained show the proposed formulation features for emulating a hierarchically controlled battery in an islanded system with practical operating conditions; moreover, it is shown that including controllers into the power flow formulation is necessary for obtaining more reliable steady-state solutions for islanded microgrid systems.