The rise of atmospheric oxygen has driven environmental change and biological evolution throughout much of Earth's history and was enabled by the evolution of oxygenic photosynthesis in the cyanobacteria. Dating this metabolic innovation using inorganic proxies from sedimentary rocks has been difficult and one important approach has been to study the distributions of fossil lipids, such as steranes and 2-methylhopanes, as biomarkers for this process. 2-methylhopanes arise from degradation of 2-methylbacteriohopanepolyols (2-MeBHPs), lipids thought to be synthesized primarily by cyanobacteria. The discovery that 2-MeBHPs are produced by an anoxygenic phototroph, however, challenged both their taxonomic link with cyanobacteria and their functional link with oxygenic photosynthesis. Here, we identify a radical SAM methylase encoded by the hpnP gene that is required for methylation at the C-2 position in hopanoids. This gene is found in several, but not all, cyanobacteria and also in alpha -proteobacteria and acidobacteria. Thus, one cannot extrapolate from the presence of 2-methylhopanes alone, in modern environments or ancient sedimentary rocks, to a particular taxonomic group or metabolism. To understand the origin of this gene, we reconstructed the evolutionary history of HpnP. HpnP proteins from cyanobacteria, Methylobacterium species, and other alpha-proteobacteria form distinct phylogenetic clusters, but the branching order of these clades could not be confidently resolved. Hence,it is unclear whether HpnP, and 2-methylhopanoids, originated first in the cyanobacteria. In summary, existing evidence does not support the use of 2-methylhopanes as biomarkers for oxygenic photosynthesis.