A hybrid control system is presented for the improvement of power quality in grid-integrated hybrid renewable energy sources (HRES) like hybrid photovoltaic-wind solar energy system using STATCOM. The proposed hybrid control system is the hybrid wrapper of both the extreme gradient boosting (XGBOOST) and Manta Ray Foraging Optimization (MRFO) and hence it is said to be as XGBOOST-MRFO control scheme. The innovation of the proposed hybrid system is the improved predictability through the participation of MRFO, reliability, adaptation for the entire parameter variations, and shorter implementation time. Depending on the minimal error objective function, MRFO improves the XGBOOST learning process. The proposed approach relies on XGBOOST-MRFO which is serving control algorithm to generate STATCOM reference signals. Here, the XGBOOST system is qualified with inputs like instantaneous previous power of the obtainable sources and the current time necessary load demand and the equivalent target reference power of the sources. Depending on the load variation, the XGBOOST-MRFO control scheme makes the gain parameters of the PI controller give the optimal control