Isolated microgrids (MGs) face challenges in performance stability and active/reactive power sharing as a result of frequency/voltage deviations and mismatched line impedance issues. In this paper, a consensus-based multiagent system (MAS) is proposed as a solution to restore voltage/frequency deviations and enable true power sharing. The invention of an Intelligent Distributed Secondary Control Scheme (IDSCS) can efficiently achieve hoped-for outcomes. The proposed IDSCS features estimation and compensation sublayers. For the estimation sublayer, discrete dynamic consensus algorithm-based state estimators are presented to collect average information of frequency, voltage, and reactive power. Each DG is viewed as an agent sharing information with its immediate neighbors through a sparse cyber communication network. In the compensation sublayer, online tuned proportional integral (PI) controllers using artificial neural networks (ANNs) are proposed as an intelligent voltage and frequency compensators. This combination uses the simplicity of the PI controller mathematical formula and ANN’s ability to deal with parameter variations and nonlinearity. Due to the global nature of the frequency parameter, the active power-sharing compensator is unnecessary. For compensating reactive power deviations, ANNs-based reactive power controllers are proposed. Furthermore, at the primary control level, the proposed strategy employs discrete-time proportional resonant (PR) controllers in a stationary reference frame, eliminating the need for any
α
β
/
d
q
or
d
q
/
α
β
transformations. Distributed implementation of the proposed method guarantees system scalability without MG topology or demand pattern expertise. The control scheme was validated using hypothetical MAS in MATLAB Simulink platform. The simulation findings indicate the proposed MG system can effectively distribute power among the DGs while maintaining voltage and frequency stable.