In Inner Mongolia, steppe grasslands face desertification or degradation because of human overuse and abandonment after inappropriate agricultural management. The soils in these abandoned croplands exist in heterogeneous environments characterized by widely fluctuating microbial growth. Quantitative polymerase chain reaction analysis of microbial genes encoding proteins involved in the nitrogen cycle was used to study Azotobacter species, nitrifiers, and denitrifiers in the soils from steppe grasslands and croplands abandoned for 2, 6, and 26 years. Except for nitrifying archaea and nitrous oxide-reducing bacteria, the relative genotypic abundance of microbial communities involved in nitrogen metabolism differed by approximately 2- to 10-fold between abandoned cropland and steppe grassland soils. Although nitrogen-cycle gene abundances varied with abandonment time, the abundance patterns of nitrogen-cycle genes separated distinctly into abandoned cropland versus light-grazing steppe grassland, despite the lack of any cultivation for over a quarter-century. Plant biomass and plant diversity exerted a significant effect on the abundance of microbial communities that mediate the nitrogen cycle (P < 0.002 and P < 0.03, respectively). The present study elucidates the ecology of bacteria that mediate the nitrogen cycle in recently abandoned croplands.