Predicting the coefficient of friction (COF) is essential for enhancing the efficiency and reliability of mechanical systems. Nevertheless, traditional mechanistic models relying on fixed values or fitted curves fail to accurately capture this complexity. To address this issue, this paper proposes a model for predicting the COF of wet friction components using an extreme gradient boosting (XGBoost) algorithm optimized by the sparrow search algorithm (SSA). This model effectively captures the nonlinear relationships among relative speed, pressure, temperature, and COF. As a result, the proposed SSA-XGBoost model exhibits excellent predictive performance with an RMSE of only 0.063, and 88.3% of the COF predictions have a relative error of less than 1%, significantly outperforming other deep learning algorithms. Additionally, to enhance the understanding of the COF prediction results for wet friction components, SHAP interpretability analysis is used to explore the influence of relative speed, pressure, and temperature on the predicted COF values.