In order to accurately predict the adsorption performance of MOFs on heavy metals in water, the structural and compositional features of MOFs as well as their experimental parameters for adsorption of heavy metals were extracted to build a dataset, which were collected from the experimental results of 48 published papers. Six regression models were trained and evaluated, including SVR, KNN, AdaBoost, GBDT, RF and Bagging. The results showed that the tree-based ensemble learning models exhibited excellent prediction performance. Especially, the GBDT was determined as the optimal algorithm. With the further application of the model, it is demonstrated that the machine learning method can accurately predict the adsorption performance of MOFs for heavy metals in water. The feature importance ranking (FIR) and partial dependence plots (PDP) analyses revealed that, besides the controllable experimental parameters, the pore size, specific surface area and pore volume of MOFs were the key factors affecting the adsorption capacity. The method in this study not only predicts the structure-performance relationships, but also simulates the removal of heavy metals in water based on effective experimental parameters, which could provide guidance for screening and optimization of adsorbent materials. © 2023 Chinese Society for Environmental Sciences. All rights reserved.