Abstract Accurate coal seam gas content facilitates to effectively prevent coal and gas outburst accidents. To solve the problem, combining improved Dung Beetle optimization algorithm (IDBO) with deep hybrid kernel extreme learning machine (DHKELM), an IDBO-DHKELM coal seam gas content prediction model is proposed. Firstly, according to the influence factors of coal seam gas content and the actual situation of mine production, the index factors of coupled gas content are determined. The correlation of index factors is analyzed by SPSS 27 software through Pearson correlation coefficient matrix. Then the principle components of original data is extracted by the principal component analysis method (KPCA). Secondly, Sine chaotic mapping, fusion improved sinusoidal algorithm and fusion adaptive Gauss-Cauchy hybrid mutation perturbation are introduced to improve Dung Beetle optimization algorithm (DBO) to enhance its global search capability. Thirdly, IDBO is used to optimize the hidden layer nodes number, regularization coefficient, penalty coefficient and kernel parameter in DHKELM, which improves prediction accuracy and further avoid the phenomenon of overfitting. Finally, the principal component extracted by KPCA is taken as the input of the model and gas content as the output of the model. The results are compared and analyzed with those of PSO-BPNN, GA-BPNN, PSO-SVM and DPO-DHKELM models. The results show that the performance of the IDBO-DHKELM model is the best in each performance index. Compared with other models, mean absolute error (MAE) of test samples in IDBO-DHKELM model is reduced by 0.402, 0.4407, 0.3554 and 0.0646, respectively. The mean absolute percentage error (MAPE) is decreased by 3.67%, 4.07%, 8.27% and 6.35%, respectively. The root mean square error (RMSE) decreases by 0.7861, 0.7148, 0.3384 and 0.1186, respectively. The coefficient of determination (R2) is increased by 0.1544, 0.1404, 0.0955 and 0.0396, respectively. Finally, IDBO-DHKELM model and other models are applied to a experimental mine. the result of IDBO-DHKELM model is the closest to the actual value, which further verifies the universality and reliability of the model. Therefore, the model is more suitable for the prediction of coal seam gas content.