The harsh polar environment results in the dominance of mosses and liverworts in tundra communities. To date, very little research has been devoted to the diversity and ecology of these groups in the High Arctic. The aim of this research was to investigate the diversity and community composition of mosses and liverworts in various stages of the ecogenesis of Svalbard ecosystems, and to identify environmental factors affecting species distribution. In 2017, 270 plots were established in a grid in eight glacier forelands and the mature tundra surrounding them. Within these plots, the percentage cover of mosses and liverworts was investigated. In 201 plots, soil samples were taken and environmental data (aspect, bare ground cover, biological soil crust cover, distance from the glacier forehead, rock cover, slope, time elapsed since the glacier’s retreat, Topographic Wetness Index, and total insolation) were obtained. In total, 105 species were recorded. Species number and composition depended on effects of both habitat type (foreland and mature tundra) and the geographical locations of glaciers, while species cover was also associated with the interaction between those factors. The following factors affected species distribution: cover of bare ground and vascular plants, distance from the glacier forehead, soil conductivity, contents of total organic carbon and total nitrogen in soil, K+ content, silt and sand contents, soil pH, time elapsed since the glacier’s retreat, and total insolation. In the glacier forelands, mosses and liverworts are less exposed to competition from other species. Therefore, in the future, if global warming progresses at its current rate, forelands may serve as important species refugia.