The Earth has cooled over the past 4.5 billion years (Gyr) as a result of surface heat loss and declining radiogenic heat production. Igneous geochemistry has been used to understand how changing heat flux influenced Archaean geodynamics, but records of systematic geochemical evolution are complicated by heterogeneity of the rock record and uncertainties regarding selection and preservation bias. Here we apply statistical sampling techniques to a geochemical database of about 70,000 samples from the continental igneous rock record to produce a comprehensive record of secular geochemical evolution throughout Earth history. Consistent with secular mantle cooling, compatible and incompatible elements in basalts record gradually decreasing mantle melt fraction through time. Superimposed on this gradual evolution is a pervasive geochemical discontinuity occurring about 2.5 Gyr ago, involving substantial decreases in mantle melt fraction in basalts, and in indicators of deep crustal melting and fractionation, such as Na/K, Eu/Eu* (europium anomaly) and La/Yb ratios in felsic rocks. Along with an increase in preserved crustal thickness across the Archaean/Proterozoic boundary, these data are consistent with a model in which high-degree Archaean mantle melting produced a thick, mafic lower crust and consequent deep crustal delamination and melting--leading to abundant tonalite-trondhjemite-granodiorite magmatism and a thin preserved Archaean crust. The coincidence of the observed changes in geochemistry and crustal thickness with stepwise atmospheric oxidation at the end of the Archaean eon provides a significant temporal link between deep Earth geochemical processes and the rise of atmospheric oxygen on the Earth.