Calcium oxalate (CaOx) is the major phase in kidney stones and the primary calcium storage medium in plants. CaOx can form crystals with different lattice types, water contents, and crystal structures. However, the conditions and mechanisms leading to nucleation of particular CaOx crystals are unclear. Here, liquid-cell transmission electron microscopy and atomistic molecular dynamics simulations are used to study in situ CaOx nucleation at different conditions. The observations reveal that rhombohedral CaOx monohydrate (COM) can nucleate via a classical pathway, while square COM can nucleate via a non-classical multiphase pathway. Citrate, a kidney stone inhibitor, increases the solubility of calcium by forming calcium-citrate complexes and blocks oxalate ions from approaching calcium. The presence of multiple hydrated ionic species draws additional water molecules into nucleating CaOx dihydrate crystals. These findings reveal that by controlling the nucleation pathways one can determine the macroscale crystal structure, hydration state, and morphology of CaOx.