Surfactants have the ability to mobilize residual oil trapped in pore spaces of matrix rocks by lowering the oil-water interfacial tension, resulting in a higher oil recovery. However, the loss of surfactants by adsorption onto the rock surface has become a major concern that reduces the efficiency of the surfactant flooding process. In this study, the adsorption behavior of an anionic surfactant to a clay mineral surface was investigated by quartz crystal microbalance with dissipation monitoring upon variations with different cation conditions. Through recording the change of frequency and dissipation of clay-modified sensors, it allows us to do a real-time quantitative analysis of the surfactant adsorption with nanogram sensitivity. The results revealed that the surfactant adsorption increased in a Ca2+-containing solution with increasing pH from 6 to 11, whereas from a Na+-containing solution, more adsorption occurred at acidic conditions. The adsorbed amount went through a maximum (∼200 mM) as a function of the Ca2+ concentration, and the Voigt model suggested that multilayer adsorption of surfactants could be as many as 4-6 monolayers. Using mixed cation (Ca2+ and Na+) solutions, the amount of adsorbed surfactant decreased linearly with decreasing fraction of CaCl2, but Na+ competed for about ∼30% adsorption sites. The importance of the presence of CaCl2 for the surfactant adsorption was stressed in high-salinity and low-salinity solutions in the presence and absence of Ca2+. Furthermore, increasing the temperature from 23 to 65 °C shows first a small increase of surfactant adsorption followed by a reduction of about 20%. The obtained results contribute to a better understanding of surfactant adsorption on clay surfaces and a guide to optimal flooding conditions with reduced surfactant loss.