Long-term irrational fertilizer inputs affect soil nutrients conditions in the agro-pastoral ecotone of North China. However, the mechanisms by which biotic and abiotic factors are affected by different fertilizer types remain unclear. A 16-year, long-term fertilization experiment was conducted to explore how soil physicochemical properties and microbial communities respond to different fertilizer types at an experimental site in North China. The key environmental factors that drove changes in soil microbial communities were also determined. In September 2019, soils were collected from plots of four fertilizer treatments: 1) non-fertilization control (CK), 2) chemical fertilization only (CF), 3) organic manure fertilization only (M), and 4) chemical fertilization plus organic manure (CFM). Compared with CK, soil organic matter, total nitrogen, available nitrogen, available phosphorus, and available potassium contents were higher in M and CFM, whereas soil pH was significantly lower in CF. Abundances of dominant soil bacterial phyla Proteobacteria, Bacteroidetes, and Gemmatimonadetes were higher in M and CFM than CK. Abundances of dominant soil fungal phyla Ascomycota was lower in CFM than in other treatments. The pathogenic fungi Fusarium, Paramyrothecium, Cladosporium, and Alternaria had the highest abundances in CK and CF, whereas abundances of the beneficial fungi Mortierella were significantly higher in M and CFM than in CF and CK. According to partial least squares path modeling, differences in fertilizer types had direct positive effects on fungal communities but little effect on bacterial communities. Overall, CFM maintained higher soil fertility and a healthy ecosystem because it increased beneficial microorganisms and inhibited pathogenic microorganisms, whereas CF increased the risk of crop infection with soil-borne diseases. The study provided a better understanding of how long-term fertilization affects microbial community composition and their associated ecosystem functions.