Overactivated microglia play a key role in sepsis-associated encephalopathy (SAE), although the involvement of T cells is unclear. γδT cells in the brain and meninges regulate normal fear responses via interleukin (IL)-17 in healthy mice. In our sepsis model, the mice showed exacerbated anxious behavior at 10 days post-induction (dpi). At 8 dpi, IL-17 mRNA was significantly upregulated in the brains of septic mice compared with those of control mice. Simultaneously, the number of γδT cells increased in the brains of septic mice in a severity-dependent manner. Additionally, IL-17-producing γδT cells, expressing both the C-X-C motif receptor (CXCR) 6 and the C-C motif receptor (CCR) 6, increased in mice brains, dependent on the severity of sepsis. The frequency of γδT cells in the meninges fluctuated similarly to that in the brain, peaking at 8 dpi of sepsis. Behavioral tests were performed on septic mice after the continuous administration of anti-γδTCR (α-γδTCR) or anti-IL-17A (α-IL-17A) antibodies to deplete the γδT cells and IL-17A, respectively. Compared with IgG-treated septic mice, α-γδTCR- and α-IL-17A-treated septic mice showed suppressed microglial activation and improvements in anxious behavior. These results suggested that CCR6+CXCR6+IL-17-producing γδT cells in the brain and meninges promote the exacerbation of SAE and sepsis-induced psychological disorders in mice.