The aim of this study was to analyse groundwater quality and botanical species composition in natural stands of purple marshlocks (Comarum palustre L., synonym Potentilla palustris L.), which is common in Central and Western Europe but little known in that region as a medicinal herb. The prospective role of C. palustre (owing to efforts to disseminate knowledge of its importance) and the possible need for organic cultivation of this species (due to degradation of its natural habitats) necessitate analysis of its habitat preferences. The methods used in the study included chemical analysis of shallow groundwater and botanical inventory, as well as comprehensive statistical analyses. We concluded that lower values of NH4 = 0.1–0.21, Ca = 6.8–25.3, Mg = 0.77–2.79, DOC = 25.9–52.9 concentrations (mg dm-3), EC = 72.2–107.6 μS· cm-1, and pH = 5.3–5.7 were conditions promoting the abundance of C. palustre. Based on the analysis of physicochemical habitat factors and botanical characteristics, as well as the statistical analyses, the species was found to possess a broad ecological amplitude with respect to most of the factors investigated, but within a range typical for its habitats. The species compositions of the phytocenoses with C. palustre were typical for nutrient-poor peatland habitats and also associated with fertile habitats which are considered optimal for the occurrence of C. palustre.