In recent years, our understanding of biological nitrogen fixation has been bolstered by a diverse array of scientific techniques. Still, the origin and extant distribution of nitrogen fixation has been perplexing from a phylogenetic perspective, largely because of factors that confound molecular phylogeny such as sequence divergence, paralogy, and horizontal gene transfer. Here, we make use of 110 publicly available complete genome sequences to understand how the core components of nitrogenase, including NifH, NifD, NifK, NifE, and NifN proteins, have evolved. These genes are universal in nitrogen fixing organisms-typically found within highly conserved operons-and, overall, have remarkably congruent phylogenetic histories. Additional clues to the early origins of this system are available from two distinct clades of nitrogenase paralogs: a group composed of genes essential to photosynthetic pigment biosynthesis and a group of uncharacterized genes present in methanogens and in some photosynthetic bacteria. We explore the complex genetic history of the nitrogenase family, which is replete with gene duplication, recruitment, fusion, and horizontal gene transfer and discuss these events in light of the hypothesized presence of nitrogenase in the last common ancestor of modern organisms, as well as the additional possibility that nitrogen fixation might have evolved later, perhaps in methanogenic archaea, and was subsequently transferred into the bacterial domain.