In this paper, a quasi Z-source Inverter (qZSI) is presented for the application in parallel operation of Battery Energy Storage Systems (BESSs) in microgrids. The qZSI is a single stage converter with two controllable DC ports. In the proposed control method to parallel battery stacks, in islanded mode of microgrid operation, the BESS supplies the load power, while the shoot-through duty cycle of inverter legs is utilized to fulfill the current sharing between the battery systems with different voltage and power ratings. In this mode, the inverter modulation index is used to control the microgrid voltage while other distributed energy resources (DERs) operate in power control mode. Furthermore, thanks to the proposed current sharing method, the oscillatory power due to the unbalanced loads is also appropriately shared between the battery systems. In the grid-connected mode of operation in which the microgrid voltage is dictated by the main grid, the current of each battery system can be independently regulated by adjusting the inverter modulation index and the shoot-through duty cycle. The performance of the proposed control strategy in both charging and discharging modes of the BESS operating in the grid-connected mode is evaluated. Moreover, in the islanded mode, the suitability of the proposed method for current sharing between the battery systems is investigated. Simulations are conducted in MATLAB/Simulink for the case of a typical microgrid involving two battery systems characterized by different current and voltage ratings.