Peanut root rot, commonly referred to as rat tail or root rot, is caused by a range of Fusarium species. A strain of bacteria (named TG5) was isolated from crop rhizosphere soil in Mount Taishan, Shandong Province, China, through whole genome sequencing that TG5 was identified as Bacillus thuringiensis, which can specifically produce chloramphenicol, bacitracin, clarithromycin, lichen VK21A1 and bacitracin, with good biological control potential. Based on liquid chromatography tandem mass spectrometry metabonomics analysis and transcriptome conjoint analysis, the mechanism of TG5 and carbendazim inducing peanut plants to resist F. oxysporum stress was studied. In general, for peanut root rot caused by F. oxysporum, B. thuringiensis TG5 has greater advantages than carbendazim and is environmentally friendly. These findings provide new insights for peanut crop genetics and breeding, and for microbial pesticides to replace traditional highly toxic and highly polluting chemical pesticides. Based on the current background of agricultural green cycle and sustainable development, it has significant practical significance and broad application prospects.