Atmospheric carbon dioxide concentrations and climate are regulated on geological timescales by the balance between carbon input from volcanic and metamorphic outgassing and its removal by weathering feedbacks; these feedbacks involve the erosion of silicate rocks and organic-carbon-bearing rocks. The integrated effect of these processes is reflected in the calcium carbonate compensation depth, which is the oceanic depth at which calcium carbonate is dissolved. Here we present a carbonate accumulation record that covers the past 53 million years from a depth transect in the equatorial Pacific Ocean. The carbonate compensation depth tracks long-term ocean cooling, deepening from 3.0–3.5 kilometres during the early Cenozoic (approximately 55 million years ago) to 4.6 kilometres at present, consistent with an overall Cenozoic increase in weathering. We find large superimposed fluctuations in carbonate compensation depth during the middle and late Eocene. Using Earth system models, we identify changes in weathering and the mode of organic-carbon delivery as two key processes to explain these large-scale Eocene fluctuations of the carbonate compensation depth.