Acquisition of ecologically relevant genes is common among ocean bacteria, but whether it has a major impact on genome evolution in marine environments remains unknown. Here, we analyzed the core genomes of 16 phylogenetically diverse and ecologically relevant bacterioplankton lineages, each consisting of up to five genomes varying at the strain level. Statistical approaches identified from each lineage up to ∼50 loci showing anomalously high divergence at synonymous sites, which is best explained by recombination with distantly related organisms. The enriched gene categories in these outlier loci match well with the characteristics previously identified as the key phenotypes of these lineages. Examples are antibiotic synthesis and detoxification in , exopolysaccharide production in, hydrocarbon degradation in , and cold adaptation in Intriguingly, the outlier loci feature polysaccharide catabolism in but not in, consistent with their primary habitat preferences in macroalga and beach sands respectively. Likewise, analysis of showed that photosynthesis related genes listed in the outlier loci are only found in high-light adapted ecotype but not in the low-light adapted ecotype. These observations strongly suggest that recombination with distant relatives is a key mechanism driving the ecological diversification among marine bacterial lineages. Acquisition of new metabolic genes has been known as an important mechanism driving bacterial evolution and adaptation in the ocean, but acquisition of novel alleles of existing genes and its potential ecological role has not been examined. Guided by population genetic theories, our genomic analysis showed that divergent allele acquisition is prevalent in phylogenetically diverse marine bacterial lineages and that the affected loci often encode metabolic functions that underlies the known ecological roles of the lineages under study.