This work investigates the performance of a single-phase grid-connected photovoltaic (PV) system under non-ideal source voltage conditions using a fuzzy logic controller. The single-phase instantaneous reactive power theory has been modified to explore the harmonic and reactive power compensation with distorted grid voltage excitation while transferring active and reactive power to the grid and the non-linear load. Instead of a traditional Proportional-Integral (PI) controller, the proposed method implements a fuzzy logic controller for the extraction of the reference compensating current. This method is compared with the traditional single-phase instantaneous reactive power theory. The advantage associated with a fuzzy logic controller is that it does not need accurate mathematical modeling of the system, instead, it is based upon the linguistic characterization of the input and output variables. Besides, care has been taken to provide uninterrupted compensation throughout the variation of the solar irradiation level. The proposed method has also been verified through a laboratory-developed prototype using a DS1103 processor.