Equilibrium molecular dynamics simulations were conducted to study the competitive adsorption and diffusion of mixtures containing n-octane and carbon dioxide confined in slit-shaped silica pores of width 1.9 nm. Atomic density profiles substantiate strong interactions between CO2 molecules and the protonated pore walls. Non-monotonic change in n-octane self-diffusion coefficients as a function of CO2 loading was observed. CO2 preferential adsorption to the pore surface is likely to attenuate the surface adsorption of n-octane, lower the activation energy for n-octane diffusivity, and consequently enhance n-octane mobility at low CO2 loading. This observation was confirmed by conducting test simulations for pure n-octane confined in narrower pores. At high CO2 loading, n-octane diffusivity is hindered by molecular crowding. Thus, n-octane diffusivity displays a maximum. In contrast, within the concentration range considered here, the self-diffusion coefficient predicted for CO2 exhibits a monotonic increase with loading, which is attributed to a combination of effects including the saturation of the adsorption capacity of the silica surface. Test simulations suggest that the results are strongly dependent on the pore morphology, and in particular on the presence of edges that can preferentially adsorb CO2 molecules and therefore affect the distribution of these molecules equally on the pore surface, which appears to be required to provide the effective enhancement of n-octane diffusivity.