The use of biostimulants to enhance microbial activity has been extensively reported. However, their regulatory properties on the ecological security of in situ composting have not yet been fully elucidated. Here, the effects of two biostimulants (fermentation agent [FM] and fulvic acid [FA]) on in situ composting were investigated under field conditions. The abundances of antibiotic resistance genes (ARGs), as well as those of the microbial communities and the activities of enzymes, were comprehensively investigated. The addition of biostimulants significantly reduced the abundances of streptomycin and sulfonamide resistance genes by 79%–97% and decreased the abundance of Gammaproteobacteria. This was particularly true for species that are members of the Enterobacteriaceae and contain many ARGs. The addition of biostimulants promoted the succession of bacterial communities toward enhancing the solubility of phosphorus, promoting the degradation of aromatic compounds, and reducing the emissions of NOx gas. The application of FA and FM resulted in distinct bacterial network structures, and many negative correlations were associated with ARGs in the temperature subnetwork in the FM treatment. This study provides an effective strategy for the in situ treatment of agricultural waste and underscores the significance of biostimulants in improving the biological safety of medium-temperature in-situ composting.