Concrete is the most commonly used construction material. However, its production leads to high carbon dioxide (CO2) emissions and energy consumption. Therefore, developing waste-substitutable concrete components is necessary. Improving the sustainability and greenness of concrete is the focus of this research. In this regard, 899 data points were collected from existing studies where cement, slag, fly ash, superplasticizer, coarse aggregate, and fine aggregate were considered potential influential factors. The complex relationship between influential factors and concrete compressive strength makes the prediction and estimation of compressive strength difficult. Instead of the traditional compressive strength test, this study combines five novel metaheuristic algorithms with extreme gradient boosting (XGB) to predict the compressive strength of green concrete based on fly ash and blast furnace slag. The intelligent prediction models were assessed using the root mean square error (RMSE), coefficient of determination (R2), mean absolute error (MAE), and variance accounted for (VAF). The results indicated that the squirrel search algorithm-extreme gradient boosting (SSA-XGB) yielded the best overall prediction performance with R2 values of 0.9930 and 0.9576, VAF values of 99.30 and 95.79, MAE values of 0.52 and 2.50, RMSE of 1.34 and 3.31 for the training and testing sets, respectively. The remaining five prediction methods yield promising results. Therefore, the developed hybrid XGB model can be introduced as an accurate and fast technique for the performance prediction of green concrete. Finally, the developed SSA-XGB considered the effects of all the input factors on the compressive strength. The ability of the model to predict the performance of concrete with unknown proportions can play a significant role in accelerating the development and application of sustainable concrete and furthering a sustainable economy.