To clarify the mechanism of the interface behavior between carbonate surface/biosurfactant solution/oil systems, the interfacial tension (IFT), surface wettability, spreading coefficient (SC), and capillary number were investigated with regard to the synergistic effects of a biosurfactant from an indigenous Gordonia terrae strain (isolated from an Iranian oil reservoir), formation water salinity, and pH using response surface methodology (RSM-CCD). According to the analysis of variance results, the process effectively depicted by the quadratic model demonstrated statistical significance in terms of the responses of IFT, wettability alteration, and SC, which were significantly affected by biosurfactant concentration. The optimal conditions were 0.260 g/L biosurfactant, 36.202 g/L salinity, and a pH of 5.9. Accordingly, the quadratic model was verified using the estimated optimal parameters, thereby confirming the accuracy of the model in which a strongly water-wet surface (contact angle change from 159° to 31°) and IFT reduction (from 23.96 to 1.26 mN/m) resulted in an SC of near-zero value (−0.18) and 25 % recovery of oil during the imbibition experiments after secondary water flooding. The desorption of the polar components of crude oil from the dolomite rock surface was also investigated through determining the un-coverage ratios of the elements using energy dispersive X-ray microanalysis and characterization. Although the solutions containing biosurfactants contributed to the alteration of the rock surface wettability, their performance strongly depended on the pH and salinity, resulting in different desorption ratios. The desorption of approximately 40 % of the adsorbed organic compounds from the carbonate surface was a critical limiting factor affecting the surface properties of the rock, and was responsible for altering the wettability to water-wet conditions. The results of this study are expected to contribute to the development of effective biosurfactant-flooding techniques for MEOR.