The microgrid has two main steady-state modes: grid-connected mode and islanded mode. The microgrid needs a high-performance controller to reduce the overshoot value that affects the efficiency of the network. However, the high voltage value causes the inverter to stop. Thus, an improved power-sharing response to the transfer between these two modes must be insured. More important points to study in a microgrid are the current sharing and power (active or reactive) sharing, besides the match percentage of power sharing among parallel inverters and the overshoot of both active and reactive power. This article aims to optimize the power response in addition to voltage and frequency stability, in order to make this network's performance more robust against external disturbance. This can be achieved through a self-tuning control method using an optimization algorithm. Here, the optimized droop control is provided by the H-infinity (H & INFIN;) method improved with the artificial bee colony algorithm. To verify the results, it was compared with different algorithms such as conventional droop control, conventional particle swarm optimization, and artificial bee colony algorithms. The implementation of the optimization algorithm is explained using the time domain MATLAB/SIMULINK simulation model.