Key messageClimate-warming related replacement of beech by oak forests in the course of natural forest succession or silvicultural decisions may considerably reduce ecosystem carbon storage of central European woodlands.ContextClimate warming may change the carbon (C) storage in forest biomass and soil through future shifts in tree species composition. With a projected warming by 2–3 K over the twenty-first century, silvicultural adaptation measures and natural succession might lead to the replacement of European beech forests by thermophilic oak forests in drought- and heat-affected regions of central and south-eastern Europe, but the consequences for ecosystem C storage of this species shift are not clear.AimsTo quantify the change in C storage in biomass and soil with a shift from beech (Fagus sylvatica) to oak forest (Quercus petraea, Q. frainetto, Q. cerris), we measured the aboveground biomass (AGC) and soil C pools (SOC).MethodsAGC pools and SOC stocks to − 100 cm depth were calculated from forest inventory and volume-related SOC content data for beech, mixed beech-oak and oak forests in three transects in the natural beech-oak ecotone of western Romania, where beech occurs at its heat- and drought-induced distribution limit.ResultsFrom the cooler, more humid beech forests to the warmer, more xeric oak forests, which are 1–2 K warmer, AGC and SOC pools decreased by about 22% (40 Mg C ha−1) and 20% (17 Mg C ha−1), respectively. The likely main drivers are indirect temperature effects acting through tree species and management in the case of AGC, but direct temperature effects for SOC.ConclusionIf drought- and heat-affected beech forests in Central Europe are replaced by thermophilic oak forests in future, this will lead to carbon losses of ~ 50–60 Mg ha−1, thus reducing ecosystem carbon storage substantially.