The application of fiber-reinforced polymer (FRP) for shear strengthening of concrete structures has become increasingly popular. However, the inherent scatter in shear test makes accurate prediction of the shear capacity a significant challenge, as traditional design code often struggle to capture the complex nonlinear interactions among multiple factors. To address this limitation, this study introduces a machine learning (ML) approach to develop a high-accuracy predictive model. A database comprising 552 experimental tests on FRP-strengthened concrete beams in shear was assembled. Three ensemble learning algorithms—Random Forest (RF), Adaptive Boosting (AdaBoost), and eXtreme Gradient Boosting (XGBoost)—were systematically compared and evaluated against predictions from three existing design codes: ACI 440.2-23, FIB Bulletin 14, and GB 50608-2020. Results indicate that all ML models significantly outperform the existing code-based calculations. Among them, the XGBoost model demonstrated the best performance, achieving a coefficient of determination ($\mathrm{R}^2$) of 0.94 and a mean absolute percentage error (MAPE) as low as 12.81% on the test set. Interpretability analysis based on shapely additive explanations (SHAP) values further identified and elucidated the physical significance of key influencing features, such as FRP bonded height ($h_f$), beam width ($b$), and stirrup reinforcement ratio ($\rho_{s v}$), and elucidated their physical significance on the shear capacity. This study confirms the superiority and engineering application potential of data-driven approaches for predicting the shear performance of FRP-strengthened members. Moreover, high-accuracy capacity prediction enables more economical and environmentally friendly strengthening designs. This contributes to reducing material overuse, lowering construction energy consumption and carbon emissions, thereby supporting the sustainability goals of structural engineering.