Quantum chemical calculations combined with Kinetic Monte Carlo simulations are performed to decipher the kinetics for the one-pot synthesis of two-dimensional graphitic carbon nitride (g-C3N4) from urea pyrolysis. Two mechanisms are considered, one involving ammelide as the intermediate compound while the other considering cyanuric acid. Different grid growing patterns are investigated, and the size, shape and density of the grids as well as the number and position of the defects are evaluated. We find that, the mechanistic pathway involving ammelide is preferred. Larger g-C3N4 grids with lower density are achieved when the rate constant for melon growing is inversely proportional to the number of local reaction sites while nearly filled smaller grids are obtained in the opposite scenario. Larger defects appear at the grid periphery while smaller holes appear throughout the grid. The synthesis of extended g-C3N4 structures is favoured if the g-C3N4 growing propensity is directly proportional to the number of reaction sites.