Tephroseris longifolia agg. is a complex group of outcrossing perennials distributed throughout Central Europe. Recent morphological study revealed six morphotypes corresponding to five previously distinguished subspecies, together with Alpine and Pannonian morphotypes of T. longifolia subsp. longifolia. The delimited morphotypes differ in relative DNA content, geographical range, and rarity. We compared ecological niches of the six morphotypes in order to assess the impact of ecological differentiation on the speciation processes within the T. longifolia agg. Further, we examined whether morphotypes with small range are more ecologically specialized than their widespread relatives. The distribution area of the aggregate includes the Alps, Apennines, Carpathians, and the Pannonian Basin. Ecological variables linked to climate, topography, soil, and vegetation were gathered from 135 circular plots recorded in 35 localities. Related variables were grouped to describe the partial ecological niches: climatic, topographic, pedological, biotic, and coenotic (based either on vascular plants or on bryophytes), each of them visualized as an envelope in the two‐dimensional nonmetric multidimensional scaling ordination space. Each partial ecological niche for a given morphotype was characterized by its position (location of the envelope centroid), breadth (surface of the envelope), and overlaps with envelopes of the other morphotypes. Mantel statistics based on Spearman correlation coefficients were used to quantify differentiation of morphotypes in ecological parameters represented by the partial ecological niches. The significant niche differentiation was confirmed for climatic, topographic, pedological, and vascular plant‐based coenotic niches. Ecological niche differentiation corresponded well to morphological and partially also to karyological differentiation. Narrowly distributed morphotypes occupied more specific habitats and had narrower ecological niches than their widespread relatives. Ecological differentiation could be considered an important driver in allopatric speciation within the T. longifolia agg. Our results demonstrate that quantification of ecological divergence is helpful in assessing evolutionary history of closely related taxa.