**Background:** Endophytic bacteria reside within plant tissues without causing harm and can benefit host plants by promoting growth and resisting pathogens. Priestia megaterium (formerly Bacillus megaterium) is a common endophyte with known antimicrobial and biocontrol properties. However, whether the same bacterial species isolated from different host plants exhibit different antimicrobial activities, and the metabolic basis for such differences, remains poorly understood. This study aimed to compare two P. megaterium strains isolated from different hosts—potato (P-NA14) and dendrobium (D-HT207)—in terms of their antimicrobial activities and metabolomic profiles.
**Methods:** Both strains were identified using 16S rDNA sequencing, phylogenetic analysis, biochemical characterization, and whole-genome sequencing. Genomic similarity was assessed using average nucleotide identity (ANI) and average amino acid identity (AAI). Antimicrobial activity was tested against five indicator strains: Pectobacterium atroseptica, Athelia rolfsii, Staphylococcus aureus ATCC 29213, S. aureus ATCC 33591, and Escherichia coli, using the Kirby-Bauer disk diffusion method. For metabolomic analysis, bacterial cultures were fermented under identical conditions, and extracts were analyzed using ultra-performance liquid chromatography coupled with quadrupole-time-of-flight mass spectrometry (UPLC-QTOF-MS). Multivariate statistical analyses including PCA, PLS-DA, and OPLS-DA were performed. Differential metabolites were identified using VIP > 1, FC > 2 (or < 0.5), and p < 0.05, and mapped to KEGG pathways.
**Key Results:** Both strains were confirmed as Priestia megaterium. The complete genome of P-NA14 was 4,929,750 bp (37.84% G+C), and D-HT207 was 5,108,847 bp (38.15% G+C). ANI and AAI between the two strains were 97.34% and 96.7%, respectively, confirming they belong to the same species. Antimicrobial testing showed that P-NA14 exhibited stronger inhibition against A. rolfsii (supernatant: 12.88 ± 0.26 mm; sediment: 8.06 ± 0.39 mm) compared to D-HT207 (supernatant: 10.23 ± 0.30 mm; sediment: 8.95 ± 0.34 mm). Conversely, D-HT207 showed stronger inhibition against P. atroseptica (supernatant: 14.19 ± 1.62 mm; sediment: 12.14 ± 0.52 mm) compared to P-NA14 (supernatant: 10.43 ± 0.19 mm; sediment: 13.53 ± 1.11 mm). Notably, the supernatant of P-NA14 inhibited S. aureus ATCC 29213 (11.23 ± 0.38 mm), while the sediment of D-HT207 inhibited E. coli (10.78 ± 0.29 mm). Neither strain inhibited S. aureus ATCC 33591. Metabolomic analysis detected 4,363 metabolites in positive mode and 4,881 in negative mode, with 636 metabolites annotated to the Metlin database. A total of 90 differential metabolites were identified (51 up-regulated, 39 down-regulated in P-NA14 vs. D-HT207). L-phenylalanine was significantly up-regulated in P-NA14 (FC = 310.95, VIP = 9.56, p = 2.62E-13). KEGG pathway analysis identified 20 significantly enriched pathways (p < 0.05), with biosynthesis of plant hormones (map01070) and ABC transporters (map02010) showing the most significant differences (p < 0.001). L-phenylalanine was linked to downstream metabolites including capsaicin, tyrosine, piperine, tomatine, and geraniol, all of which have reported antimicrobial activity against S. aureus.
**Clinical Implications:** This study provides a metabolomic perspective on how the same bacterial species from different plant hosts can exhibit distinct antimicrobial activities. The findings suggest that L-phenylalanine and its downstream metabolites may be key determinants of differential antimicrobial activity, particularly against S. aureus. These insights could inform the selection of endophytic bacterial strains for biocontrol applications in agriculture, and may guide the development of strain-specific microbial formulations for plant disease management. The study also highlights the importance of considering host-microbe interactions in the production of antimicrobial secondary metabolites.