Modern power systems require increased intelligence and flexibility in the control and optimization to ensure the capability of maintaining a generation-load balance, following serious disturbances. This issue is becoming more significant today due to the increasing number of microgrids (MGs). The MGs mostly use renewable energies in electrical power production that are varying naturally. These changes and usual uncertainties in power systems cause the classic controllers to be unable to provide a proper performance over a wide range of operating conditions. In response to this challenge, the present paper addresses a new online intelligent approach by using a combination of the fuzzy logic and the particle swarm optimization (PSO) techniques for optimal tuning of the most popular existing proportional-integral (PI) based frequency controllers in the ac MG systems. The control design methodology is examined on an ac MG case study. The performance of the proposed intelligent control synthesis is compared with the pure fuzzy PI and the Ziegler-Nichols PI control design methods.