Wettability modification of solid rocks with surfactants is an important process and has the potential to recover oil from reservoirs. When wettability is altered by use of surfactant solutions, capillary pressure, relative permeabilities, and residual oil saturations change wherever the porous rock is contacted by the surfactant. In this study, a mechanistic model is described in which wettability alteration is simulated by a new empirical correlation of the contact angle with surfactant concentration developed from experimental data. This model was tested against results from experimental tests in which oil was displaced from oil-wet cores by imbibition of surfactant solutions. Quantitative agreement between the simulation results of oil displacement and experimental data from the literature was obtained. Simulation of the imbibition of surfactant solution in laboratory-scale cores with the new model demonstrated that wettability alteration is a dynamic process, which plays a significant role in history matching and prediction of oil recovery from oil-wet porous media. In these simulations, the gravity force was the primary cause of the surfactant-solution invasion of the core that changed the rock wettability toward a less oil-wet state.