The role of biodiversity in ecosystem function receives substantial attention, yet despite the diversity and functional relevance of microorganisms, relationships between microbial community structure and ecosystem processes remain largely unknown. We used tropical rain forest fertilization plots to directly compare the relative abundance, composition and diversity of free-living nitrogen (N)-fixer communities to in situ leaf litter N fixation rates. N fixation rates varied greatly within the landscape, and 'hotspots' of high N fixation activity were observed in both control and phosphorus (P)-fertilized plots. Compared with zones of average activity, the N fixation 'hotspots' in unfertilized plots were characterized by marked differences in N-fixer community composition and had substantially higher overall diversity. P additions increased the efficiency of N-fixer communities, resulting in elevated rates of fixation per nifH gene. Furthermore, P fertilization increased N fixation rates and N-fixer abundance, eliminated a highly novel group of N-fixers, and increased N-fixer diversity. Yet the relationships between diversity and function were not simple, and coupling rate measurements to indicators of community structure revealed a biological dynamism not apparent from process measurements alone. Taken together, these data suggest that the rain forest litter layer maintains high N fixation rates and unique N-fixing organisms and that, as observed in plant community ecology, structural shifts in N-fixing communities may partially explain significant differences in system-scale N fixation rates.