Cyanobacterial diazotrophs are considered to be the most important source of fixed N2 in the open ocean. Biological N2 fixation is catalyzed by the extremely O2-sensitive nitrogenase enzyme. In cyanobacteria without specialized N2-fixing cells (heterocysts), mechanisms such as decoupling photosynthesis from N2 fixation in space or time are involved in protecting nitrogenase from the intracellular O2 evolved by photosynthesis. However, it is not known how cyanobacterial cells limit O2 diffusion across their membranes to protect nitrogenase in ambient O2-saturated surface ocean waters. Here, we explored all known genomes of the major marine cyanobacterial lineages for the presence of hopanoid synthesis genes, since hopanoids are a class of lipids that might act as an O2 diffusion barrier. We found that, whereas all non−heterocyst-forming cyanobacterial diazotrophs had hopanoid synthesis genes, none of the marine Synechococcus, Prochlorococcus (non−N2-fixing), and marine heterocyst-forming (N2-fixing) cyanobacteria did. Finally, we conclude that hopanoid-enriched membranes are a conserved trait in non−heterocyst-forming cyanobacterial diazotrophs that might lower the permeability to extracellular O2. This membrane property coupled with high respiration rates to decrease intracellular O2 concentration may therefore explain how non−heterocyst-forming cyanobacterial diazotrophs can fix N2 in the fully oxic surface ocean.