Enhanced coalbed methane technology (ECBM) can significantly benefit CBM recovery and geological carbon sequestration. However, blindly raising the injection pressure has not yet achieved an ideal recovery performance. To extract CBM more safely and effectively, it is necessary to investigate the mechanisms of CH4 displacement in coal under different gas injection modes at the molecular scale. In the study, we constructed a unit cell model of anthracite coal and then adopted the grand canonical Monte Carlo method (GCMC), molecular dynamics algorithm (MD), and density functional theory (DFT) to calculate the isothermal adsorption capacity of different gases in coal, as well as the interaction energy between each gas and the coal molecules. Furthermore, we simulated the molecular dynamics processes of the CH4 displacement by injecting isobaric and high-pressure CO2/N-2 and analyzed the variation rules of CO2/N-2 and CH4 diffusivity and the displacement rate in coal. The results show that the adsorption capacities of different gases in the model are ranked as CO2 > CH4 > N-2, and the dispersion interaction between the three gases and coal molecules is dominant. CO2 exhibits the highest dispersion energy (-31.20 kJ/mol), followed by CH4 (-29.36 kJ/mol) and N-2 (-21.54 kJ/mol). In the initial stage of gas injection, the CH4 displacement by high-pressure gas is the main pattern, and free gas is mainly produced at this time. The displacement rate of high-pressure injection before the system equilibrium is higher than that of isobaric diffusion (about 1.5-5 times). Moreover, the CH4 displacement rate of high-pressure injection increases with the pressure rise of the injected gas, but it decays rapidly. After the system reaches equilibrium, the isobaric diffusion effect gradually dominates the CH4 displacement. At this stage, a large amount of adsorbed gas is produced, which greatly determines the overall displacement amount of the system. The total CH4 displacement is influenced by a combined action of the competitive adsorption and the CH4 partial pressure change. In the isobaric diffusion system, CO2 has the strongest competitive adsorption capacity, and the partial pressure change has a greater effect on the CH4 displacement than that of the high-pressure injection, due to the free space enlargement in the system, resulting in the maximum CH4 displacement in the CO2 isobaric injection. The higher the injected CO2/N-2 pressure, the lower the CH4 displacement efficiency after equilibrium, and the CH4 displacement rate decreases by about 34-50%.