The optimal reactive power dispatch (ORPD) is a complex, nonlinear, and constrained optimization problem. This paper presents the application of a new metaheuristic optimization technique called the slime mold algorithm (SMA) for solving the developed objective function of ORPD combining with renewable energy sources. The presented objective function is to minimize the total operating cost of the system through the minimization of all reactive power costs, total real power loss, voltage deviation of load buses, the system overload and improve voltage stability. The formulation of the ORPD problem combining with renewable energy sources with five different objective functions is then converted to a coefficient single objective function achieving various operating constraints. The SMA technique has been tested and proven on the IEEE 30-bus system and IEEE-118 bus system using different scenarios. Five different scenarios, with and without renewable energy sources, are presented on the two-test system and the simulation results of the SMA is compared to some optimization techniques from the literature under the same test system data, optimal control variables, and operational constraints. The superiority and effectiveness of the SMA are proven through comparison with the other obtained results from recently published optimization techniques.