The binding of metal ions with humic acid (HA) plays an important role in the aggregation of HA and the migration of metal ions in the environments. The effects of common cations (Na+, Mg2+, Ca2+ and Al3+) and heavy metal ions (Ag+, Cd2+, Cu2+, Cr3+ and Eu3+) on the aggregation of HA were investigated systematically by aggregation kinetics, spectroscopic techniques and molecular dynamic (MD) simulations. The critical coagulation concentration (CCC) of mono-, di- and trivalent cations could be predicted by the Schulze-Hardy rule. The aggregation of HA in the presence of Na+ and Ag+ was mainly due to the reduction of repulsive force and the hydrogen bonds between HA molecules. While the complexation of di- and trivalent cations with carboxylic/phenolic groups, or the cation-π interactions enhanced the intra- or inter-molecular bridges in HA and then contributed greatly to the aggregation of HA. Heavy metal ions could easily pass through the electric double-layer of HA compared with common cations. MD simulations further signified the strong aggregation ability of HA molecules in solutions containing high valence metal ions. These findings are important for understanding not only how the influence of metal ions on the aggregation of HA, but also the conditions which ions more efficient for aggregation.