Abstract This article articulates the frequency control in an isolated microgrid (MG) under a centralized secondary controller. The penetration of distributed generators (DGs) which are weather dependant, and some of them are inertia less cause the instability in the MG. Besides this, unusual/abrupt load change, communication delay, and parameter change uncertainties make the MG more unstable. So, to restore the stability of the MG a sliding mode controller (SMC) is employed. The design of the SMC is carried by selfish herd optimization (SHO) algorithm. To validate the performance of SHO-SMC controller, it is compared with the results obtained by GOA-FOPID-(1+PI), SHO-PID, SHO- FOPID, and SHO-FOPID-(1+PI) controllers. Further, to establish an ameliorated dynamic response of the MG, SHO is modified by applying fuzzy logic named as fuzzy adaptive SHO (FA-SHO). In addition to this, in a two area MG, the potential of SHO/FA-SHO SMC controllers over SHO-SMC, and SHO/FA-SHO FOPID-(1+PI) controllers has been examined. Finally, with some crucial intermittent uncertainties like abrupt load change, time delay, and parameter variation, the robustness of the proposed controller is established.