Soil abiotic and biotic interactions govern important ecosystem processes. However, the mechanisms behind these interactions are complex, and the links between specific environmental factors, microbial community structures, and functions are not well understood. Here, we applied DNA shotgun metagenomic techniques to investigate the effect of inorganic fertilizers N, P, K, and NPK on the bacterial community composition and potential functions in grassland soils in a 54-year experiment. Differences in total and available nutrients were found in the treatment soils; interestingly, Al, As, Mg, and Mn contents were variable in N, P, K, and NPK treatments. Bacterial community compositions shifted and Actinobacteria were overrepresented under the four fertilization treatments compared to the control. Redundancy analysis of the soil parameters and the bacterial community profiles showed that Mg, total N, Cd, and Al were linked to community variation. Using correlation analysis, Acidobacteria, Bacteroidetes, and Verrucomicrobia were linked similarly to soil parameters, and Actinobacteria and Proteobacteria were linked separately to different suites of parameters. Surprisingly, we found no fertilizers effect on microbial functional profiles which supports functional redundancy as a mechanism for stabilization of functions during changes in microbial composition. We suggest that functional profiles are more resistant to environmental changes than community compositions in the grassland ecosystem.