The increased penetration of distributed energy resources is inspiring the entire design of conventional electrical power systems. A Microgrid (MG) includes distributed generation, loads, energy storage, and a control system capable of operating in grid-connected mode and/or island mode. The power quality (PQ) issue is one of the main technical challenges in an MG power system. To improve PQ, it is necessary to analyze the harmonic distortion of the system. Moreover, harmonic distortion in MG networks has significantly reduced PQ, affecting the stability of the system. The shunt active power filter (SAPF) has been extensively used to diminish the current harmonics and verified as being the best solution. Hence, in this paper, the impact of PQ issues in an adopted standalone MG system (comprising solar and fuel cell based renewable energy sources) is investigated in the presence of SAPF. The SAPF is realized using a conventional synchronous reference frame (SRF) technique for current generation with a pulse-width modulation voltage source inverter technique to generate pulses for the inverter along with a PI controller to regulate the DC-link capacitor voltage. The proposed model is developed in MATLAB/SIMULINK and the results validate the superiority of the proposed technique over others in terms of harmonic elimination.