This paper presents an intelligent control approach to optimally tune control parameters utilized in the control structure of a microgrid (MG) so that the voltage and frequency of islanded MGs return to the nominal values under occurring sudden changes in load. The proposed approach is based on restoring the voltage and frequency by using online tuning of the control parameters by means of an intelligent self-optimizingbased MG central controller (MGCC). The MGCC is used in order to implement an optimal secondary voltage/frequency control. An online ANN tuner is applied to the system to adjust the secondary controllers' parameters. The main advantage of online ANN-based MGCC is independency from human actions under occurring disturbances and also in industrial and uncertain environments. Simulation results are presented to show the feasibility of the proposed intelligent approach.