Aerobic granular sludge is a kind of microbial polymer formed by self-immobilization under aerobic conditions. It has been widely studied because of its promising application in wastewater treatment. However, the granulation process of aerobic sludge is still a key factor affecting its practical application. In this paper, a three-dimensional (3D) multi-species mathematical model of aerobic granular sludge was constructed using the cellular automata (CA) theory. The growth process of aerobic granular sludge and its spatial distribution of microorganisms were studied under different conditions. The simulation results show that the aerobic granules were smaller under high shear stress and that the autotrophic bacterial content of the granular sludge interior was higher. However, the higher the dissolved oxygen concentration, the larger the size of granular sludge and the higher the content of autotrophic bacteria in the interior of the granular sludge. In addition, inhibition of toxic substances made the aerobic granule size increase more slowly, and the spatial distribution of the autotrophic bacteria and the toxic-substance-degrading bacteria were mainly located in the outer layer, with the heterotrophic bacteria mainly existing in the interior of the granular sludge.