The ever-rising consumption of fossil fuels has led to dramatically increased CO2 emissions and notably global warming. Investigations of diffusion behaviors of small guest molecules such as CH4, CO2, N2, H2O, and O2 were critical for the relief the global warming, effective implementation of the injection of CO2 and N2 to enhance the CBM (coalbed methane) recovery (CO2-ECBM, N2-ECBM), as well as the prediction and prevention of coal spontaneous combustion. Herein, using the self-created coal vitrinite macromolecular representation, the self-diffusion coefficients and transport diffusion coefficients of CH4, CO2, N2, H2O, and O2 were clarified via MM (molecular mechanics), GCMC (grand canonical Monte Carlo), and MD (molecular dynamics) to clarify the impacts from different ensembles, as well as the pressure and temperature dependence. The self-diffusion mechanism was also discussed with the aid from the trajectory analysis. For the identified gas species and temperature, the self-diffusion coefficients (Ds) and transport diffusion coefficients (Dt) were higher for NPH (constant parameter: particle number, system pressure, thermodynamic enthalpy) and NPT (constant parameter: particle number, system pressure, temperature) ensemble than NVE (constant parameter: particle number, system volume, system energy) and NVT (constant parameter: particle number, system volume, temperature). For all ensembles, the DsH2O has always jumped up with the increasing temperature independent of the ensembles. The DtH2O were higher than CH4 and CO2 for NPH, NVE, and NVT ensembles. DtCH4 has steep increase points for NPT and NPH ensemble at high temperatures, resulting in the higher DtCH4 than DtCO2. However, DtCH4 was overall lower than DtCO2 for NVE and NVT ensemble at 298 ∼ 358 K. The diffusion activation energy increases with the increasing pressure, indicating that the diffusion barrier rises as the pressure increases. Also, the higher swelling deformation of H2O suggested that the water injection during the drainage and depressurization process should be reduced to achieve the successful ECBM engineering. The results in this paper verify the feasibility of ECBM and provides the innovative theory and technology for “carbon neutralization and carbon peak” target.