This article studied the load frequency control (LFC) of a multi-source microgrid with the presence of renewable energy sources. To maintain a sustainable power supply, the frequency of the system must be kept constant. A Proportional–Integral–Derivative (PID) controller is presented as a secondary controller to control the frequency of the microgrid in island mode, and the integral of squared time multiplied by error squared (ISTES) is used as a performance index. The use of the Craziness-Based Particle Swarm Optimization (CRPSO), which is an improved version of Particle Swarm Optimization (PSO), improves the convergence speed in optimizing the nonlinear problem of load and frequency controller design. The test microgrid is composed of the load and distributed generation units such as diesel generators, photovoltaics and wind turbines. The proposed controller provided the desired response to adjusting the microgrid frequency, achieving the final response after a short time and making it more stable and less oscillatory compared with the conventional system.