This study utilized molecular dynamics simulations to examine the impact of surfactant and brine on the interaction between oil and calcite rock. Sodium dodecyl sulfate (SDS) functioned as the surfactant, while NaCl represented the brine, and heptane served as the organic oil phase. The introduction of NaCl led to a decrease in energy between the oil and rock molecules, from 4.18E(+03) to 2.36E(+03) kcal/mol. This energy reduction was changed to 2.64E(+03) kcal/mol by adding surfactant. When both NaCl and SDS were present, the energy dropped to -46.636159 kcal/mol. Through the utilization of radial distribution function and concentration profiles, the study explored the location and buoyancy of heptane molecules on the calcite surface. The results highlighted the efficacy of SDS as an anionic surfactant, particularly in combination with NaCl at a temperature of 373 K, in augmenting the buoyancy of heptane molecules on calcite rock.