In mixed-phase or ice clouds, ice can be formed through heterogeneous nucleation. A major type of ice-nucleating particle (INP) in the atmosphere are mineral dust particles. For mixed-phase clouds, the pH of water droplets can vary widely and influence ice nucleation by altering the surface of some INPs, including mineral dust. Kaolinite is a commonly occurring clay mineral, and laboratory experiments, as well as molecular dynamics (MD) simulations, have demonstrated its ice-nucleating efficiency at neutral pH. We examine the influence of pH on the ice-nucleating efficiency of kaolinite, in the immersion freezing mode, through both droplet freezing experiments and MD simulations. Droplet freezing experiments using KGa-1b kaolinite samples are reported under both acidic (HNO3 solutions) and basic (NaOH solutions) conditions, covering the measured pH range 0.18-13.26. These experiments show that the ice-nucleating efficiency of kaolinite is not significantly influenced by the presence of acid but is reduced in extremely basic conditions. We report MD simulations aimed at gaining a microscopic understanding of the pH dependence of ice nucleation by kaolinite. The Al(001), Si(001), and three edge surfaces of kaolinite are considered, but ice nucleation was observed only for the Al(001) surface. The hydroxy groups exposed on the Al(001) surface can be deprotonated in a basic solution or dual-protonated in an acidic solution, which can influence ice nucleation efficiency. The protonation state of the Al(001) surface for a particular pH can be estimated using previously measured pKa values. We find that the monoprotonated Al(001) surface expected to be stable at near-neutral pH is the most effective ice-nucleating surface. In MD simulations, the ice nucleation efficiency persists for dual-protonation but decreases significantly with increasing deprotonation, qualitatively consistent with the experimental observations. Taken together, our experimental and MD results for a wide range of pH values support the suggestion that the Al(001) surface may be important for ice nucleation by kaolinite. Additionally, the deprotonation of hydroxy groups on INP surfaces can have a significant effect on their ice-nucleating ability.