Penetration of plug-in hybrid electric vehicles (PHEVs) is capable of alleviating numerous global environmental and energy challenges. Utilization of a significant number of PHEVs with significant capacity and control capabilities can increase electrical grid flexibility. However, optimum management of such vehicles with renewable energy sources (RESs) would be one of the primary difficulties needing to be investigated. In the form of a microgrid, the operation of substantial RESs’ and PHEVs’ penetration would be achieved when operating within a microgrid. The problem has been formulated and approached as a single-objective optimization model aiming to minimize the total cost of the grid-tied MG. The converged barnacles mating optimizer (CBMO) algorithm is deployed to tackle the problem. The derived results verify the desired performance of the method compared to well-established ones. In scenario 1, the CBMO method determines the MG operating costs that are lower than those given by some well-established methods including the genetic algorithm (GA), imperialist competitive algorithm (ICA), and particle swarm optimization (PSO). The cost computed by the CBMO is 263.632 €ct/day. Likewise, the values of cost for scenarios 2 and 3 utilizing the hybrid CBMO method are 300.1364 €ct/day and 336.2154 €ct/day, respectively. The findings confirm the usefulness of the proposed CBMO algorithm with an excellent convergence rate. Comparing the average solution time of the CBMO algorithm with those provided by other algorithms reveals the excellent performance of the CBMO method. The obtained results indicate that the mean simulation time of the suggested CBMO approach in the first case is 5.19 s, whereas the time required by the GA, PSO, and ICA is 12.92 s, 10.73 s, and 7.27 s, respectively.