This paper presents an enhanced compensation strategy for distributed generation (DG) systems to simultaneously achieve accurate power sharing and harmonics compensation at the point of common coupling (PCC). In the proposed control strategy, the output impedance is modified at the fundamental and harmonic frequencies to compensate for the line impedance mismatches among DG units, which results in accurate power sharing. In addition, load harmonic currents are effectively adjusted by the DG units to effectively compensate the PCC voltage harmonics. Additionally, the DG equivalent impedance is regulated adaptively to ensure accurate harmonic power sharing even in the presence of sudden load changes. Furthermore, a distributed communication network is adopted instead of a central controller to increase the reliability and stability of the microgrid system. The proposed control strategy is applied to a prototype microgrid system, and its effectiveness and reliability are experimentally validated.