A power distribution grid exhibits the characteristics of a weak grid owing to the existence of scattered high-power distributed power-generation devices. The grid impedance affects the robust stability of grid-connected inverters, leading to harmonic resonance, or even instability in the system. Therefore, a study of the stability of grid-connected inverters with high grid impedance based on impedance analysis is presented in this paper. The output impedance modeling of an LCL-type single-phase grid-connected inverter is derived, where the effects of the PLL loop and the digital control delays on the output impedance characteristics have been taken into account. To enhance the stability of grid-connected inverters with different grid impedance, a novel impedance-phased compensation control strategy is proposed by increasing the phase margin of the grid-connected inverters. Specifically, a detailed implementation and parameter design of the impedance-phased compensation control method is depicted. Finally, an impedance-phased dynamic control scheme combined with online grid impedance measurement is introduced and also verified by the experiment results.