Using molecular dynamics simulations, we have investigated the process of oil molecules detachment from dolomite surface in different surfactant solutions (anionic, cationic, nonionic, amphoteric). The effect of surfactant molecules on the process of oil detachment from dolomite surface is extensively examined. We demonstrated that oil detachment time in nonionic surfactant solution is about 4 times of that in anionic surfactant solution and cationic surfactant solution, and oil detachment time in amphoteric surfactant solution is about 6 times of that in anionic surfactant solution and cationic surfactant solution for dolomite surface. Secondly, the process of oil detachment from four kinds of mineral models (silica modified with carboxy groups, calcite, dolomite, siderite) in nonionic surfactant solution is also studied in this paper. The results demonstrate that the oil detachment time from calcite surface is about 30 times of that from dolomite surface in nonionic surfactant solution. It is demonstrated that the optimal surfactant molecule can speed up the oil detachment from a solid surface. In summary, this work provides a feasible route to choose and achieve a better oil-displacing agent based on the interaction energy between the oil molecules and solid surface, which is also important for shortening oil detachment time and contributes to its applications in cleaning fields.