Background and aims Plant litter chemistry is a key driver of decomposition in peatlands. This study explored the relative contributions of phylogeny and environment to litter chemistry of peat mosses (Sphagnum), the key peat-forming plants on earth. Methods Fifteen Sphagnum species, representing three taxonomic sections ACUTIFOLIA, CUSPIDATA and SPHAGNUM, were sampled across a wide range of hydro-geochemical conditions. For all species we characterised chemical composition within (i) inorganic elements, (ii) carbohydrate polymers (iii) noncarbohydrates. Results The variation in carbohydrates was mostly explained by taxonomic section, suggesting phylogenetic conservation of carbohydrate composition. ACUTIFOLIA species invested relatively more in pectins, whereas CUSPIDATA and SPHAGNUM species invested more in hemicellulose. The composition of non-carbohydrates was mainly influenced by environment, except for some constituents for which the variation was more correlated to phylogeny. Finally, the variation in inorganic element concentrations mostly reflected hydro-geochemical conditions within and between peatlands. Conclusions The separation into an environmentally independent, phylogenetically conserved group of compounds (structural carbohydrates) and an environmentally dependent, variable group of compounds (inorganic elements, non-carbohydrates) has important implications both for understanding patterns in and for upscaling of spatially variable ecosystem processes associated with peat decomposition such as carbon sequestration, nutrient cycling and greenhouse gas emissions.