Earth is heading towards a climate that last existed more than three million years ago (Ma) during the ‘mid-Pliocene warm period’1, when atmospheric carbon dioxide concentrations were about 400 parts per million, global sea level oscillated in response to orbital forcing2,3 and peak global-mean sea level (GMSL) may have reached about 20 metres above the present-day value4,5. For sea-level rise of this magnitude, extensive retreat or collapse of the Greenland, West Antarctic and marine-based sectors of the East Antarctic ice sheets is required. Yet the relative amplitude of sea-level variations within glacial–interglacial cycles remains poorly constrained. To address this, we calibrate a theoretical relationship between modern sediment transport by waves and water depth, and then apply the technique to grain size in a continuous 800-metre-thick Pliocene sequence of shallow-marine sediments from Whanganui Basin, New Zealand. Water-depth variations obtained in this way, after corrections for tectonic subsidence, yield cyclic relative sea-level (RSL) variations. Here we show that sea level varied on average by 13 ± 5 metres over glacial–interglacial cycles during the middle-to-late Pliocene (about 3.3–2.5 Ma). The resulting record is independent of the global ice volume proxy3 (as derived from the deep-ocean oxygen isotope record) and sea-level cycles are in phase with 20-thousand-year (kyr) periodic changes in insolation over Antarctica, paced by eccentricity-modulated orbital precession6 between 3.3 and 2.7 Ma. Thereafter, sea-level fluctuations are paced by the 41-kyr period of cycles in Earth’s axial tilt as ice sheets stabilize on Antarctica and intensify in the Northern Hemisphere3,6. Strictly, we provide the amplitude of RSL change, rather than absolute GMSL change. However, simulations of RSL change based on glacio-isostatic adjustment show that our record approximates eustatic sea level, defined here as GMSL unregistered to the centre of the Earth. Nonetheless, under conservative assumptions, our estimates limit maximum Pliocene sea-level rise to less than 25 metres and provide new constraints on polar ice-volume variability under the climate conditions predicted for this century.