Jerusalem artichoke juice is valued for its nutritional content and health benefits. Spontaneous fermentation enhances its flavor, quality, and functional components through microbial metabolic activities. This study used high-throughput sequencing to analyze microbial community changes, and LC-MS and GC-MS to detect secondary metabolites and flavor compounds during fermentation. During natural fermentation, beneficial bacteria like Lactobacillus and Pediococcus increased, promoting lactic acid production and inhibiting harmful bacteria, while environmental bacteria decreased. Similarly, fungi shifted from environmental types like Geosmithia and Alternaria to fermentation-associated Pichia and Penicillium. A total of 1666 secondary metabolites were identified, with 595 upregulated and 497 downregulated. Key metabolic pathways included phenylpropanoid biosynthesis, with significant increases in phenylalanine, tryptophan, and related metabolites. Lipid and nucleotide metabolism also showed significant changes. Flavor compounds, including 134 identified alcohols, esters, acids, and ketones, mostly increased in content after fermentation. Notable increases were seen in Phenylethyl Alcohol, Ethyl Benzenepropanoate, 3-Methylbutyl Butanoate, Ethyl 4-Methylpentanoate, 5-Ethyl-3-Hydroxy-4-Methyl-2(5H)-Furanone, Ethyl Decanoate, Hexanoic Acid, and 1-Octanol. γ-aminobutyric acid (GABA) and other functional components enhanced the health value of the juice. This study provides insights into microbial and metabolic changes during fermentation, aiding in optimizing processes and improving the quality of fermented Jerusalem artichoke juice for functional food development.