The swelling of shale and coal induced by the CO 2 -enhanced gas recovery (CO 2 -EGR) has proved to reduce the reservoir permeability and the CH 4 production. In this work, we have studied the adsorption-induced deformation of the organic carbon slit micropores during the displacement of CH 4 by the injected CO 2 using grand canonical Monte Carlo simulation. Particularly, we have investigated the effect of the injected CO 2 ratio on the deformation strain for each pore width from 0.5 to 2.0 nm under a series of pressures and temperatures. The results showed that the pore deformation is distinct depending on the pore size and the injected CO 2 ratio, which generally includes monotonic swelling and shrinkage followed by swelling with bulk pressure. The pores below 0.55 nm have no deformation, as these pores are too narrow for both CH 4 and CO 2 . The maximum swelling in CO 2 -EGR occurs in the 0.55−0.59 nm pores, which contributes most in terms of the CO 2 storage but has no contribution to CH 4 recovery. The maximum shrinkage happens in the 0.66 nm pore, which provides most to the CH 4 recovery. Besides, the maximum swelling and shrinkage is generally not affected by the CO 2 ratio except the deformation at low pressures and even a small amount of CO 2 injection could induce the maximum swelling for the corresponding pores in shale or coal. The bulk pressure has a more significant effect on the deformation of the 0.75−1.05 nm pores with the increase of CO 2 ratio, and the pore width for the maximum swelling decreases with the increase of pressure. At 100 MPa, a second minor peak of swelling and shrinkage occurs in the 0.85−0.9 and 0.95−1.05 nm pores, respectively. Furthermore, temperature has no effect on the maximum swelling at 100 MPa,but the overall deformation generally decreases with the increase of temperature including the maximum shrinkage. The 1.4−2.0 nm pores only have slight deformation regardless of the CO 2 ratio, pressure, and temperature. It is also found that the solvation pressure is the driving force for the deformation irrespective of the adsorbed gas species. However, the adsorbed CH 4 and CO 2 molecules exert different solvation pressures to the pores during the competitive adsorption. The local solvation pressure is heterogeneous across the pore space for both CH 4 and CO 2 . The positive pressures are close to the pore walls, which tend to swell the pores, but negative pressures are in the pore interior, which incline to contract the pore.