An increase in renewable energy generation in the microgrid can cause voltage oscillation problems. To address this issue, an equivalent circuit of the microgrid was established, including a synchronous generator, grid-connected inverter, and constant power load. Then, the impact of different renewable energy generation ratios, different direct current (DC) voltage loops, and phase-locked loop control bandwidths of the grid-connected inverter on microgrid stability were analyzed. The results indicate that an increase in the renewable energy generation ratio leads to a decrease in the stability margin of the microgrid. A microgrid stability improvement method involving the parallel connection of a virtual resistor with the grid-connected inverter was proposed. The resistance value of the virtual resistor was obtained through an adaptive algorithm. This method ensures the stable operation of the microgrid under different renewable energy generation ratios.