Renewable energy, particularly wind energy, is expected to contribute significantly to the overall power generation. Induction machines are extensively used as generators in wind power generation because of their multiple benefits, such as robustness, reliability, and low cost and maintenance. However, due to the reactive power demand from the system to which they are connected, this type of generator brings new problems related to power quality, generally consisting of voltage regulation and reactive power compensation. These problems may cause voltage drops and dynamic instability. This study presents a metaheuristic method to attain a microgrid system with an optimal distribution based on its different constraints. The numerical model of an induction generator constructed in MATLAB/Simulink was used, and the simulation results obtained demonstrate the efficacy of the proposed metaheuristic technique.