Displacement methane (CH) by injection gases is regarded as an effective way to exploit shale gas and sequestrate carbon dioxide (CO). In our work, the displacement of CH by injection gases is studied by using the grand canonical Monte Carlo (GCMC) simulation. Then, we use molecular dynamics (MD) simulation to study the adsorption occurrence behavior of CH in different pore size. This shale model is composed of organic and inorganic material, which is an original and comprehensive simplification for the real shale composition. The results show that both the displacement amount of CH and sequestration amount of CO see an upward trend with the increase of pore size. The CO molecules can replace the adsorbed CH from the adsorption sites directly. On the contrary, when N molecules are injected into the slit pores, the partial pressure of CH would decrease. With the increase of the pores width, the adsorption occurrence transfers from single adsorption layer to four adsorption layers. It is expected that our work can reveal the mechanisms of adsorption and displacement of shale gas, which could provide a guidance and reference for displacement exploitation of shale gas and sequestration of CO.