Recently, fast uptake of renewable energy sources (RES) in the world has introduced new difficulties and challenges; one of the most important challenges is providing economic energy with high efficiency and good quality. To reach this goal, many traditional and smart algorithms have been proposed and demonstrated their feasibility in obtaining the optimal solution. Therefore, this paper introduces an improved version of Bonobo Optimizer (BO) based on a quasi-oppositional method to solve the problem of designing a hybrid microgrid system including RES (photovoltaic (PV) panels, wind turbines (WT), and batteries) with diesel generators. A comparison between traditional BO, the Quasi-Oppositional BO (QOBO), and other optimization techniques called Harris Hawks Optimization (HHO), Artificial Electric Field Algorithm (AEFA) and Invasive Weed Optimization (IWO) is carried out to check the efficiency of the proposed QOBO. The QOBO is applied to a stand-alone hybrid microgrid system located in Aswan, Egypt. The results show the effectiveness of the QOBO algorithm to solve the optimal economic design problem for hybrid microgrid power systems.