Biomass production for bioenergy may change soil microbes and influence ecosystem properties. To explore the impact of different bioenergy cropping systems on soil microorganisms, the compositions and quantities of soil microbial communities (16S rRNA gene) and N-cycling functional groups (nifH, bacterial amoA, archaeal amoA and nosZ genes) were assessed under maize, switchgrass and Miscanthus x giganteus at seven sites representing a climate gradient (precipitation and temperature) in Illinois, USA. Overall, the site-to-site variation in community composition surpassed the variation due to plant type, and microbial communities under each crop did not converge on a ‘typical’ species assemblage. Fewer than 5% of archaeal amoA, bacterial amoA, nifH and nosZ OTUs were significantly different among these crops, but the largest differences observed at each site were found between maize and the two perennial grasses. Quantitative PCR revealed that the abundance of the nifH gene was significantly higher in the perennial grasses than in maize, and we also found significantly higher total N in the perennial grass soils than in maize. Thus, we conclude that cultivation of these perennial grasses, instead of maize, as bioenergy feedstocks can improve soil ecosystem nitrogen sustainability by increasing the population size of N-fixing bacteria.