Emerging evidence suggests the microbiome critically influences the onset and progression of neurodegenerative diseases; however, the identity of neuroprotective bacteria and the molecular mechanisms that respond within the host remain largely unknown. We took advantage of Caenorhabditis elegans' well characterized nervous system and ability to eat uni-bacterial diets to determine how metabolites and neuroprotective molecules from single species of bacteria suppress degeneration of motor neurons. We found Comamonas aquatica significantly protects against degeneration induced by overexpressing a key regulator of axon degeneration, TIR-1/SARM1. Genetic analyses and metabolomics reveal Comamonas protects against neurodegeneration by providing sufficient Vitamin B12 to activate METR-1/MTR methionine synthase in the intestine, which then lowers toxic levels of homocysteine in TIR-1-expressing animals. Defining a molecular pathway between Comamonas and neurodegeneration adds significantly to our understanding of gut-brain interactions and, given the prominent role of homocysteine in neurodegenerative disorders, reveals how such a bacterium could protect against disease.