We propose a novel binary backtracking search algorithm (BBSA) based optimal scheduling controller in an IEEE 14 bus system for controlling microgrids (MGs) in the form of virtual power plant (VPP) towards sustainable renewable energy sources integration. The VPP and MGs models are simulated and tested based on real parameters and loads data recorded in Perlis, Malaysia employed on each bus of the system for 24 hours. BBSA optimization algorithm provides the best binary fitness function i.e. global minimum fitness for finding the best cell to generate the optimal schedule. The obtained results show that the BBSA algorithm provides the best schedule for the energy management turning DGs ON and OFF in the MGs with the consideration of real weather conditions for solar irradiation and wind speed, battery charge/discharges, fuel states and demand of the specific hour. The developed BBSA optimization algorithm minimizes the power generation cost, reduces power losses, delivers the reliable high-quality power to the loads and integrates priority based sustainable MGs into the grid. Thus, VPP can enable efficient integration of DGs and MGs into the grid by balancing their variability.