A β-galactosidase (EC 22.214.171.124) from Bacillus circulans (Biolacta FN5) can catalyse transgalactosylation reactions with lactose as a donor. In addition to their function as cofactors and structural stabilisers in biocatalytic reactions, cations can play a role in salt-bridge interactions and electrostatic charge screening of proteins. In this work, we investigated the impact of calcium, magnesium, sodium and potassium, commonly found in dairy whey systems, on the transgalactosylation kinetics of the β-galactosidase from Bacillus circulans. Both molecular modeling and quantitative experimental methods were used to assess enzyme aggregation and resulting loss in enzyme activity that is initiated by high concentrations of these cations. The effect of this loss in activity with time was studied during the transgalactosylation of N-acetylglucosamine (GlcNAc) to N-acetyllactosamine (LacNAc) using lactose as the donor. No significant change in hydrolysis or transgalactosylation reaction kinetics was observed at low concentrations of divalent cations (Ca2+ or Mg2+) or up to 100 mM of monovalent cations (Na+ or K+). The enzymatic yield and selectivity, however, were significantly affected at concentrations of 100 mM of Ca2+ or Mg2+. These changes were the result of both the loss in enzyme activity and a reduction in the reaction rate constant for hydrolysis and formation of the undesired isomer, Allo-LacNAc. In particular, addition of magnesium enhanced the selectivity for LacNAc over Allo-LacNAc, with no significant reduction in the LacNAc yield. These findings suggest that cations can be employed to regulate the action of β-galactosidase during transgalactosylation through the formation of protein aggregates.