The chemical composition and biological activities of roots of Codonopsis javanica (Blume) Hook.f. & Thomson collected from two distinct ecological regions of Vietnam (Kon Tum and Lai Chau Provinces) were investigated. Chemical profiling was performed using Ultra-performance liquid chromatography - Quadrupole Time-of-Flight - Tandem mass spectrometry (UPLC-QTOF-MS/MS)-based metabolite profiling (, while anti-inflammatory activity was evaluated via inhibition of nitric oxide (NO) production and immunomodulatory potential was assessed using phagocytosis-enhancing assays. A total of 35 metabolites belonging to major phytochemical classes, including saponin, phenolics, flavonoids, alkaloids, carboxylic acid, amino acids and other minor metabolites, were detected in C. javanica, of which 31 compounds are reported for the first time in C. javanica. Differences in metabolite profiles and related biological activities of C. javanica were observed between the two regions. Samples from Kon Tum Province showed stronger NO-inhibitory activity (IC₅₀ = 84.69 µg/mL) and higher phagocytosis-enhancing activity (17.25 ± 1.59 %) than those from Lai Chau Province. These differences in bioactivity are likely attributable to variations in the levels of several key metabolites. The Kon Tum samples (CKT) contained higher amounts of syringin, lobetyolin, tangshenoside I, codonoside A and codonoside B compared with the Lai Chau samples (CLC), suggesting that these compounds play important roles in the biological activities of C. javanica. This is the first report combining UPLC-QTOF-MS/MS-based metabolite profiling with NO inhibition and phagocytosis-enhancing evaluations of C. javanica. The findings highlight the strong influence of ecological and climatic factors on the metabolic landscape and bioactivity of this medicinal plant.