The processes causing the middle Miocene global cooling, which marked the Earth's final transition into an `icehouse' climate about 13.9 million years ago (Myr ago), remain enigmatic. Tectonically driven circulation changes and variations in atmospheric carbon dioxide levels have been suggested as driving mechanisms, but the lack of adequately preserved sedimentary successions has made rigorous testing of these hypotheses difficult. Here we present high-resolution climate proxy records, covering the period from 14.7 to 12.7 million years ago, from two complete sediment cores from the northwest and southeast subtropical Pacific Ocean. Using new chronologies through the correlation to the latest orbital model, we find relatively constant, low summer insolation over Antarctica coincident with declining atmospheric carbon dioxide levels at the time of Antarctic ice-sheet expansion and global cooling, suggesting a causal link. We surmise that the thermal isolation of Antarctica played a role in providing sustained long-term climatic boundary conditions propitious for ice-sheet formation. Our data document that Antarctic glaciation was rapid, taking place within two obliquity cycles, and coincided with a striking transition from obliquity to eccentricity as the drivers of climatic change.