Bacteria in the phylum Gemmatimonadota are globally distributed and abundant in microbial communities of various environments, playing an important role in driving biogeochemical cycling on Earth. Although high diversities in taxonomic composition and metabolic capabilities have been reported, little is known about the environmental preferences and associated functional features that facilitate adaptation among different Gemmatimonadota lineages. This study systematically analyzed the relationships between the environments, taxonomy, and functions of Gemmatimonadota lineages, by using a comparative genomics approach based on 1356 Gemmatimonadota genomes (213 high-quality and non-redundant genomes) available in a public database (NCBI). The taxonomic analysis showed that the 99.5% of the genomes belong to the class Gemmatimonadetes, and the rest of the genomes belong to the class Glassbacteria. Functional profiling revealed clear environmental preference among different lineages of Gemmatimonadota, and a marine group and two non-marine groups were identified and tested to be significantly different in functional composition. Further annotation and statistical comparison revealed a large number of functional genes (e.g., amiE, coxS, yfbK) that were significantly enriched in genomes from the marine group, supporting enhanced capabilities in energy acquisition, genetic information regulation (e.g., DNA repair), electrolyte homeostasis, and growth rate control. These genomic features are important for their survival in the marine environment, which is oligotrophic, variable, and with high salinity. The findings enhanced our understanding of the metabolic processes and environmental adaptation of Gemmatimonadota, and further advanced the understanding of the interactions of microorganisms and their habitats.