Our study suggests that betaine may promote the transition of microglia from the M1 to the M2 phenotype by inhibiting NLRP3 inflammasome activation, thereby attenuating lipopolysaccharide-induced depression-like behavior. Here, NLRP3 is linked to depressive symptom measurement.