Upland tropical forests have expanded and contracted in response to past climates, but it is not clear whether similar dynamics were exhibited by gallery (riparian) forests within savanna biomes. Because such forests generally have access to ample water, their extent may be buffered against changing climates. We tested the long-term stability of gallery forest boundaries by characterizing the border between gallery forests and savannas and tracing the presence of gallery forest through isotopic analysis of organic carbon in the soil profile. We measured leaf area index, grass vs. shrub or tree coverage, the organic carbon, phosphorus, nitrogen and calcium concentrations in soils and the carbon isotope ratios of soil organic matter in two transitions spanning gallery forests and savanna in a Cerrado ecosystem. Gallery forests without grasses typically show a greater leaf area index in contrast to savannas, which show dense grass coverage. Soils of gallery forests have significantly greater concentrations of organic carbon, phosphorus, nitrogen and calcium than those of savannas. Soil organic carbon of savannas is significantly more enriched in 13C compared with that of gallery forests. This difference in enrichment is in part caused by the presence of C4 grasses in savanna ecosystem and its absence in gallery forests. Using the 13C abundance as a signature for savanna and gallery forest ecosystems in 1 m soil cores, we show that the borders of gallery forests have expanded into the savanna and that this process initiated at least 3000–4000 bp based on 14C analysis. Gallery forests, however, may be still expanding as we found more recent transitions according to 14C activity measurements. We discuss the possible mechanisms of gallery forest expansion and the means by which nutrients required for the expansion of gallery forest might accumulate.