Abstract Recent studies on the use of ammonia as an alkali for performing alkali-surfactant-polymer (ASP) floods have shed light on its advantages over conventional alkalis such as lower alkali requirements, ease of transportation and storage. This study is aimed towards understanding surfactant adsorption in sandstone and carbonate rocks in the presence of ammonia. Zeta potential measurements were performed to characterize Bandera brown sandstone and Silurian dolomite surfaces in the presence of ammonia and sodium carbonate. A series of experiments were performed with and without ammonia such as static surfactant adsorption experiments on crushed Bandera brown sandstone and Silurian dolomite rocks, single phase surfactant transport experiments in sandstone and carbonate cores, surfactant phase behavior to identify an ultra-low interfacial tension (IFT) surfactant formulation, and oil recovery coreflood experiments using these surfactant formulations. Zeta potential measurements showed a reduction in zeta potential of Bandera brown and Silurian dolomite by adding ammonia to increase the pH. Surfactant adsorption experiments showed that ammonia was able to reduce the adsorption on sandstones, but not much difference was observed for carbonates. The ultra-low IFT surfactant formulations developed with and without ammonia showed very similar phase behavior. High oil recoveries and very low surfactant retentions were observed in the oil recovery experiments performed in sandstones.