In this paper, a novel hybrid sine-cosine and spotted Hyena-based chimp optimization algorithm (hybrid SSC) is adopted for the precise tuning of proportional-integral (PI) controllers in a microgrid system. The microgrid integrates multiple renewable energy sources, including photovoltaic (PV) panels, wind turbines, a fuel cell, and a battery storage system, all connected to a common DC bus. This DC bus interfaces with the main grid through a voltage source converter (VSC). The microgrid comprises a total of eight PI controllers distributed across various components: the boost converter in the wind system, the fuel cell system, the battery energy storage device, and the VSC controller. The hybrid SSC optimization algorithm effectively combines the exploration capabilities of the sine-cosine algorithm (SCA) with the exploitation strengths of the spotted Hyena optimizer (SHO) and Chimp optimization algorithm (ChOA), aiming to achieve optimal tuning of the PI controllers. This hybrid approach ensures an enhanced dynamic response and overall system performance by minimizing the integral of the time-weighted squared error (ITSE) for each controller. The simulation results, directed in a MATLAB/SIMULINK environment, demonstrate the efficacy of the hybrid SSC algorithm in improving the stability, response time and efficacy of the microgrid. The proposed technique significantly outperforms traditional tuning techniques, ensuring robust operation and seamless addition of renewable energy sources with the main grid. This study contributes to the advancement of intelligent control strategies for modern microgrids, emphasizing the importance of hybrid optimization algorithms in achieving optimal performance in complex energy systems.