Al-, Si-, P- and S-doped graphenes(X-Gr, X=Al, Si, P and S) were used to represent the surface models of coal with the structural heterogeneity. Based on the spin-polarized density-functional theory, coalbed methane(CBM, the main components are CH4, CO2 and H2O) adsorption on X-Gr was investigated and the corresponding adsorption energy, adsorption equilibrium distance, Mulliken charge, charge density differences and density of states were well discussed. The result show that Al- and Si-Gr are sensitive to CBM, whereas CBM adsorptions on P- and S-Gr are found to be physical adsorption. In brief, the interactions between CBM and X-Gr are slightly depend on the orientations of CBM gas molecules and the metallicity of the dopants in Gr. The higher adsorption energy, the higher metallicity of the dopants becomes, namely Al-Gr>Si-Gr>P-Gr>S-Gr. Through systematical and theoretical analysis, we found that CO2 and H2O were easy to adsorb on surface models of coal than CH4. Hence, injection of CO2 or H2O in coal seams could enhance CH4 recovery. In addition, we suggest that Al- and Si-Gr could be a good gas sensors for CBM because of the higher interactions between Al-/Si-Gr and CBM.