The aggregation of variably charged nanoparticles is usually induced by the changes in internal and external conditions, such as solution temperature, pH, particle size, van der Waals force, and electrostatic repulsion among particles. In order to explore the effect of pH on the aggregation of variable charge nanoparticles, this paper proposed an extended model based on the 3D on-lattice Cluster-Cluster Aggregation (CCA) model. The extended model successfully established the relationship between pH and sticking probability, and used Smoluchowski theory to calculate the aggregation rate of nanoparticles. The simulation results showed that: (1) the change of the aggregation rate of the variable charge nanoparticles with pH conforms to the Gaussian distribution, (2) the initial particle concentration has a significant effect on the aggregation rate of the nanoparticles, and (3) pH can affect the competition between van der Waals force and electrostatic repulsion between particles, thereby affecting the degree of openness of clusters. The research demonstrated the extended CCA model is valuable in studying the aggregation of the variably charged nanoparticles via transforming the corresponding influence factors into the influence on the sticking probability.