Accurately predicting methane adsorption capacity in coal is crucial for assessing coalbed methane resources and ensuring safe extraction. Conventional methane isotherm adsorption experiments often suffer from human error and experimental artifacts, leading to inaccurate and poorly reproducible outcomes. Furthermore, they are time-consuming to conduct, requiring specific and well calibrated experimental equipment. In this paper, a Random Forest (RF) algorithm is introduced to improve the accuracy and reliability of methane adsorption capacity prediction. Approximately 200 sets of experimental data, including parameters such as experimental temperature, equilibrium pressure, moisture, ash content, and volatile matter of coal samples, were collected and analyzed to establish a prediction model based on the RF algorithm. The robustness and reliability of the model were validated using K-Fold cross-validation and hyperparameter optimization. The results indicate that the Random Forest algorithm performs exceptionally well in predicting methane adsorption capacity, with optimal values for mean squared error (MSE) and the coefficient of determination (R 2 ), demonstrating a high correlation between predicted and actual values. Machine learning algorithms are innovatively combined with traditional experimental methods in this study. By training the model using large data sets, issues of error and reproducibility in traditional experiments are addressed, improving experimental efficiency and providing a more reliable method for evaluating coalbed methane resources. To some extent, the method can replace traditional methane isotherm adsorption experiments in coal, improving prediction accuracy and efficiency and demonstrating promising prospects for wide application.