Deciduous forests form the dominant natural vegetation of Europe today, but were restricted to small refugia during Pleistocene cold stages, implying an evolutionary past shaped by recurrent range contractions and expansions. Cold-stage forest refugia were probably widespread in southern and central Europe, with the northwestern Balkan Peninsula being of particular importance. However, the actual number and location of deciduous forest refugia, as well as the connections between them, remain disputed. Here, we address the evolutionary dynamics of the deciduous forest understorey species Euphorbia carniolica as a proxy for past forest dynamics. To do so, we obtained genomic and morphometric data from populations representing the species' entire range, investigated phylogenetic position and intraspecific genetic variation, tested explicit demographic scenarios and applied species distribution models. Our data support two disjoint groups linked to separate refugia on the northwestern and central Balkan Peninsula. We find that genetic differentiation between groups started in the early Pleistocene via vicariance, suggesting a larger distribution in the past. Both refugia acted as sources for founder events to the southeastern Alps and the Carpathians, whereas the latter were likely colonized before the last cold stage. In line with traditional views on the pre-Pleistocene origin of many southeastern European deciduous forest species, the origin of E. carniolica was dated to the late Pliocene. The fact that E. carniolica evolved at a time when a period of continuous forestation was ending in much of Eurasia provides an interesting biogeographical perspective on the past links between Eurasian deciduous forests and their biota.