Carbon dioxide (CO2) injection in unconventional gas-bearing shale reservoirs is a promising method for enhancing methane recovery efficiency and mitigating greenhouse gas emissions. The majority of methane is adsorbed within the micropores and nanopores (≤50 nm) of shale, which possess extensive surface areas and abundant adsorption sites for the sequestration system. To comprehensively discover the underlying mechanism of enhanced gas recovery (EGR) through CO2 injection, molecular dynamics (MD) provides a promising way for establishing the shale models to address the multiphase, multicomponent fluid flow behaviors in shale nanopores. This study proposes an innovative method for building a more practical shale matrix model that approaches natural underground environments. The grand canonical Monte Carlo (GCMC) method elucidates gas adsorption and sequestration processes in shale gas reservoirs under various subsurface conditions. The findings reveal that previously overlooked pore slits have a significant impact on both gas adsorption and recovery efficiency. Based on the simulation comparisons of absolute and excess uptakes inside the kerogen matrix and the shale slits, it demonstrates that nanopores within the kerogen matrix dominate the gas adsorption while slits dominate the gas storage. Regarding multiphase, multicomponent fluid flow in shale nanopores, moisture negatively influences gas adsorption and carbon storage while promoting methane recovery efficiency by CO2 injection. Additionally, saline solution and ethane further impede gas adsorption while facilitating displacement. Overall, this work elucidates the substantial effect of CO2 injection on fluid transport in shale formations and advances the comprehensive understanding of microscopic gas flow and recovery mechanisms with atomic precision for low-carbon energy development.