The separation of carbon dioxide (CO 2 ) and methane (CH 4 ) in zeolite is significantly influenced by extra-framework cations. Through grand canonical Monte Carlo (GCMC) and molecular dynamics (MD) simulations, the adsorption and diffusion properties of CO 2 and CH 4 in diverse M-ZSM-5 zeolites (M = Li, Na, and K) were analyzed. Metal cations, especially at low pressures, enhance the adsorption of CO 2 . Also, Li-ZSM-5 exhibits the highest CO 2 loading, followed by Na-ZSM-5 and K-ZSM-5. However, the interaction between CH 4 and the cations is relatively insignificant. For binary mixtures, CO 2 dominates the competitive adsorption process. Also, M-ZSM-5 zeolites offer superior adsorption selectivity compared to silicalite-1, with a trend of Li-ZSM-5 > Na-ZSM-5 > K-ZSM-5. Additionally, MD simulations revealed that the metal cations will limit the diffusion of molecules. The combined effect of interaction and spatial constraint induced by cations has a joint influence on the diffusion of CO 2 , and the self-diffusion coefficients in three models are close.