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. The gene discussed is NLRP3; the disease is depressive disorder.