Individuals with diabetes frequently suffer from anxiety; however, the mechanism for this association remains incompletely understood. Diabetes-associated genes have been implicated in the control of central nervous system (CNS) disorders. In the current study, we observed a marked down-regulation of secretagogin (SCGN) across multiple organs in diabetic mouse models, and Scgn knockout (Scgn -/-) mice developed diabetes, confirming SCGN as a diabetes-associated gene. Behavioral analyses revealed that Scgn -/- mice exhibited anxiety-like phenotypes compared to wild-type (WT) mice. Notably, germ-free (GF) Scgn -/- mice did not manifest these behavioral abnormalities, suggesting that SCGN influences anxiety through gut microbiota-dependent mechanisms. Subsequent shotgun metagenomic sequencing confirmed gut microbiota dysbiosis in Scgn -/- mice. Fecal microbiota transplantation (FMT) from Scgn -/- donors into GF mice recapitulated the anxiety-like phenotypes. Given the established roles of microbial metabolites in gut-brain axis signaling, we identified a substantial depletion of butyrate, a key neuroactive metabolite, in fecal and plasma samples from Scgn -/- mice. Immunohistochemical analysis revealed neural overactivation, as reflected by c-Fos expression in the medial prefrontal cortex (mPFC) of Scgn -/- mice, which was corroborated by metabolomic profiling indicating dysregulated tryptophan metabolism in this region. Mechanistically, up-regulation of indoleamine 2,3-dioxygenase 1 (IDO1) and kynureninase (KYNU) led to excessive production of quinolinic acid, an NMDA receptor agonist that increased pyramidal neuron excitability in the mPFC, thereby promoting anxiety-like behaviors in Scgn -/- mice. Supplementation with Odoribacter splanchnicus, a butyrate-producing bacterium, could reverse this abnormal signaling pathway and alleviate anxiety-like behaviors. Critically, butyrate administration mitigated this anxiogenic cascade in vivo and in vitro, as validated by electrophysiological recordings. Taken together, our findings demonstrate that SCGN deficiency induces gut dysbiosis, reduces butyrate availability, and promotes excitotoxicity in the mPFC, at least in part, through disrupted tryptophan metabolism, ultimately leading to anxiety. This SCGN-modulated gut-brain axis highlights potential new therapeutic targets for the treatment of diabetes-associated anxiety.