The Australian–Indonesian summer monsoon affects rainfall variability and hence terrestrial productivity in the densely populated tropical Indo–Pacific region. It has been proposed that the main control of summer monsoon precipitation on millennial timescales is local insolation, but unravelling the mechanisms that have influenced monsoon variability and teleconnections has proven difficult, owing to the lack of high-resolution records of past monsoon behaviour. Here we present a precisely dated reconstruction of monsoon rainfall over the past 12,000 years, based on oxygen isotope measurements from two stalagmites collected in southeast Indonesia. We show that the summer monsoon precipitation increased during the Younger Dryas cooling event, when Atlantic meridional overturning circulation was relatively weak. Monsoon precipitation intensified even more rapidly from 11,000 to 7,000 years ago, when the Indonesian continental shelf was flooded by global sea-level rise. We suggest that the intensification during the Younger Dryas cooling was caused by enhanced winter monsoon outflow from Asia and a related southward migration of the intertropical convergence zone. However, the early Holocene intensification of monsoon precipitation was driven by sea-level rise, which increased the supply of moisture to the Indonesian archipelago.