Much work has been done targeting hydrocarbon fluids in organic materials of source rocks such as kerogen and bitumen. These were, however, limited in scope to simple fluids confined in nanopores and ignored multi-component effects. Recent studies using hydrocarbon mixtures revealed that compositional variation caused by selective adsorption and nano-confinement significantly alters the fluids phase equilibrium properties. One important consequence of this behavior is capillary condensation and trapping of hydrocarbons in nanopores. Fluid expansion is not an effective mechanism in these pores. To show the impact of lean gas injection on the hydrocarbons recovery, an investigation is carried out using equilibrium molecular simulations of hydrocarbon mixtures with varying concentrations of CO2. The results with N2 are also presented for comparison. We show that large molecules in the mixture are left behind in nanopores are generally responsible for the residual hydrocarbon amount, and that high-pressure CO2 injection extracts more hydrocarbons from the nanopores than that based on pressure depletion only. In these small pores, the injection pressure and the kind of injected gas play a critical role in recovery. We also show that the nanopore surface area, rather than the nanopore size, is the primary factor affecting the residual amount. CO2 molecules introduced into the nanpores during the soaking period of a cyclic injection operation lead to exchange of molecules and a shift in the phase equilibrium properties of the confined fluids. This exchange has a stripping effect and in turn enhances the hydrocarbons recovery. However, the subsequent production and pressure depletion has no additional impact on the recovery beyond the stripping effect. CO2 injection and soaking has the ability to extract the heavier hydrocarbon fluids irrespective of the operating pressure conditions, while the pressure depletion produces the lighter fluids from the nanopores.