This paper presents the power quality improvement in a microgrid, supplying a nonlinear and unbalanced load using fuzzy logic controller based static synchronous compensator (STATCOM). The microgrid contains a hybrid combination photovoltaic (PV), fuel cell (FC) along with the battery energy storage system (BESS) where a decentralized power sharing algorithm is used to control its power management. Here, STATCOM is used as a compensator for the hybrid system to reduce the harmonics in the voltage and current profile at the point of common coupling (PCC). The current reference is generated taking into account, the active and reactive power to be supplied by the micro-source which is connected to the compensator. Depending on the power requirement of the nonlinear load, the proposed control scheme can change modes of operation without any external communication interfaces. The proposed control scheme can even compensate system unbalance caused by the single-phase micro sources and load changes. The efficacy of the proposed power quality improvement control and method in such a microgrid is validated through simulation in MATLAB/SIMULINK software with detailed dynamic models of the micro-sources and power electronic converters.