To gain insights into the roles of beneficial PGPR in controlling soil-borne disease, we adopted a metabolomics approach to investigate the beneficial impacts of P. polymyxa NSY50 on cucumber seedling roots under the pathogen of Fusarium oxysporum f. sp. cucumerinum (FOC). We found that NSY50 pretreatment (NSY50 + FOC) obviously reduced the production of reactive oxygen species (ROS). Untargeted metabolomic analysis revealed that 106 metabolites responded to NSY50 and/or FOC inoculation. Under FOC stress, the contents of root osmotic adjustment substances, such as proline and betaine were significantly increased, and dehydroascorbic acid and oxidized glutathione (GSH) considerably accumulated. Furthermore, the contents of free amino acids such as tryptophan, phenylalanine, and glutamic acid were also significantly accumulated under FOC stress. Similarly, FOC stress adversely affected glycolysis and the tricarboxylic acid cycles and transferred to the pentose phosphate pathway. Conversely, NSY50 + FOC better promoted the accumulation of α-ketoglutaric acid, ribulose-5-phosphate, and 7-phosphosodiheptanone compared to FOC alone. Furthermore, NSY50 + FOC activated GSH metabolism and increased GSH synthesis and metabolism-related enzyme activity and their encoding gene expressions, which may have improved redox homoeostasis, energy flow, and defense ability. Our results provide a novel perspective to understanding the function of P. polymyxa NSY50, accelerating the application of this beneficial PGPR in sustainable agricultural practices.