Equilibrium molecular dynamics simulations were conducted for pure n-butane and for mixtures containing n-butane and carbon dioxide confined in 2 nm wide slit-shaped pores carved out of cristobalite silica. A range of thermodynamic conditions was explored, including temperatures ranging from subcritical to supercritical, and various densities. Preferential adsorption of carbon dioxide near the −OH groups on the surface was observed, where the adsorbed CO2 molecules tend to interact simultaneously with more than one −OH group. Analysis of the simulation results suggests that the preferential CO2 adsorption to the pore walls weakens the adsorption of n-butane, lowers the activation energy for n-butane diffusivity, and consequently enhances n-butane mobility. The diffusion results obtained for pure CO2 are consistent with strong adsorption on the pore walls, as the CO2 self-diffusion coefficient is low at low densities, increases with loading, and exhibits a maximum as the density is increased further because of hindrance effects. As the temperature increases, the maximum in self-diffusion coefficient is narrower, steeper, and shifted to lower loading. The simulation results are also quantified in terms of molecular density profiles for both butane and CO2 and in terms of residence time of the various molecules near the solid substrate. Our results could be useful for designing separation devices and also for better understanding the behavior of fluids in subsurface environments.