Abstract The ever-increasing number of available microbial genomes and metagenomes provide new opportunities to investigate the links between niche partitioning and genome evolution in the ocean, notably for the abundant and ubiquitous marine picocyanobacteria Prochlorococcus and Synechococcus . Here, by combining metagenome analyses of the Tara Oceans dataset with comparative genomics, including phyletic patterns and genomic context of individual genes from 256 reference genomes, we first showed that picocyanobacterial communities thriving in different niches possess distinct gene repertoires. We then managed to identify clusters of adjacent genes that display specific distribution patterns in the field (CAGs) and are thus potentially involved in the adaptation to particular environmental niches. Several CAGs are likely involved in the uptake or incorporation of complex organic forms of nutrients, such as guanidine, cyanate, cyanide, pyrimidine or phosphonates, which might be either directly used by cells, for e.g. the biosynthesis of proteins or DNA, or degraded into inorganic nitrogen and/or phosphorus forms. We also highlight the frequent presence of CAGs involved in polysaccharide capsule biosynthesis in Synechococcus populations thriving in both nitrogen- and phosphorus-depleted areas, which are absent in low-iron regions, suggesting that the complexes they encode may be too energy-consuming for picocyanobacteria thriving in these areas. In contrast, Prochlorococcus populations thriving in iron-depleted areas specifically possess an alternative respiratory terminal oxidase, potentially involved in the reduction of Fe(III) into Fe(II). Together, this study provides insights into how these key members of the phytoplankton community might behave in response to ongoing global change. Significance Statement Picocyanobacteria face various environmental conditions in the ocean and numerous studies have shown that genetically distinct ecotypes colonize different niches. Yet the functional basis of their adaptation remains poorly known, essentially due to the large number of genes of yet unknown function, many of which have little or no beneficial effect on fitness. Here, by combining comparative genomics and metagenomics approaches, we have identified not only single genes but also entire gene clusters, potentially involved in niche adaptation. Although being sometimes present in only one or a few sequenced strains, they occur in a large part of the population in specific ecological niches and thus constitute precious targets for elucidating the biochemical function of yet unknown niche-related genes.