The screening and design of “green” biochar materials with high adsorption capacity play a pivotal role in promoting the sustainable treatment of Cd(II)-containing wastewater. In this study, six typical machine learning (ML) models, namely Linear Regression, Random Forest, Gradient Boosting Decision Tree, CatBoost, K-Nearest Neighbors, and Backpropagation Neural Network, were employed to accurately predict the adsorption capacity of Cd(II) onto biochars. A large dataset with 1051 data points was generated using 21 input variables obtained from batch adsorption experiments, including preparation conditions for biochar (2 features), physical properties of biochar (4 features), chemical composition of biochar (9 features), and adsorption experiment conditions (6 features). The rigorous evaluation and comparison of the ML models revealed that the CatBoost model exhibited the highest test R2 value (0.971) and the lowest RMSE (20.54 mg/g), significantly outperforming all other models. The feature importance analysis using Shapley Additive Explanations (SHAP) indicated that biochar chemical compositions had the greatest impact on model predictions of adsorption capacity (42.2 %), followed by adsorption conditions (37.57 %), biochar physical characteristics (12.38 %), and preparation conditions (7.85 %). The optimal experimental conditions optimized by partial dependence plots (PDP) are as follows: as high Cd(II) concentration as possible, C(%) of 33 %, N(%) of 0.3 %, adsorption time of 600 min, pyrolysis time of 50 min, biochar dosage of less than 2 g/L, O(%) of 42 %, biochar pH value of 11.2, and DBE of 1.15. This study unveils novel insights into the adsorption of Cd(II) and provides a comprehensive reference for the sustainable engineering of biochars in Cd(II) wastewater treatment.