This paper presents a new configuration and control technique with a novel energy transfer strategy for gird-connected single-phase energy storage systems using five-level flying capacitor (FC) based active-neutral-point-clamped (ANPC) inverter. The proposed grid-connected energy storage system with eliminated common-mode voltage can use either one or two separate battery modules in the dc-link of the single-phase five-level inverter. By utilizing a proper modulation technique and a novel energy transfer strategy for one battery module on the dc side of the inverter, the dc-link capacitors' average voltage can be maintained balanced with smaller size capacitors. In case of using two separate battery modules in the dc-link of the five-level inverter, even under unequal dc-link voltages, the inverter will have high quality grid side current waveform during charging and discharging of the dc-link batteries. By using this novel energy transfer strategy, the two dc-link battery modules can have different energy transfer rates, which will add flexibility to the control of the system and can be used for battery balancing techniques. The effectiveness of the proposed methodology is investigated through simulation studies in different scenarios.