Diversity of secondary lichen metabolites was studied in epiphytic lichens on six phorophytes—spruce, pine, birch, alder, aspen and poplar in the Middle Urals of Russia. Atranorin, usnic, fumarprotocetraric acid, zeorin, and gyrophoric acid were found in 31, 24, 23, 18, and 14 species, respectively, of 237 taxa collected. Seventy-seven species (i.e., 32% of total species documented) contained no secondary metabolites. Spectra of secondary metabolites of fruticose and foliose lichens varied on different phorophytes, while in crustose species the strong dependence on the tree species was not detected. This is different to the pH dependence of saxicolous lichens where crustose lichens were more susceptible to the rock chemistry. The results of Canonical Correspondence Analysis reveal the affinity of species containing depsides, depsidones or usnic acid to acidic substrata and those lacking secondary metabolites or containing terpenes and antraquinones to the pH-neutral bark. We suppose that phenolic compounds and flavonoids, as chemical constituents of bark, may interact with lichen symbioses and elements in phellem, and similarly to the lichen acids shape the affinity of species to the substrata.