Biological nitrogen fixation is a keystone process in many ecosystems, providing bioavailable forms of fixed nitrogen for members of the community. In the present study, degenerate primers targeting the nitrogenase iron protein-encoding gene (nifH) were designed and employed to investigate the physical and chemical parameters that underpin the distribution and diversity of nifH as a proxy for nitrogen-fixing organisms in the geothermal springs of Yellowstone National Park (YNP), Wyoming. nifH was detected in 57 of the 64 YNP springs examined, which varied in pH from 1.90 to 9.78 and temperature from 16°C to 89°C. This suggested that the distribution of nifH in YNP is widespread and is not constrained by pH and temperature alone. Phylogenetic and statistical analysis of nifH recovered from 13 different geothermal spring environments indicated that the phylogeny exhibits evidence for both geographical and ecological structure. Model selection indicated that the phylogenetic relatedness of nifH assemblages could be best explained by the geographic distance between sampling sites. This suggests that nifH assemblages are dispersal limited with respect to the fragmented nature of the YNP geothermal spring environment. The second highest ranking explanatory variable for predicting the phylogenetic relatedness of nifH assemblages was spring water conductivity (a proxy for salinity), suggesting that salinity may constrain the distribution of nifH lineages in geographically isolated YNP spring ecosystems. In summary, these results indicate a widespread distribution of nifH in YNP springs, and suggest a role for geographical and ecological factors in constraining the distribution of nifH lineages in the YNP geothermal complex.