In the current study, we applied the GLP-1R agonist exendin-4 (EX-4) to verify whether activating GLP-1R could alleviate diabetes with depression by inhibiting the GSDMD-mediated microglial pyroptosis pathway both in vivo and in vitro, thus exploring the underlying mechanism and identifying more efficient therapeutic targets for depression in patients with diabetes. The gene discussed is GSDMD; the disease is depressive disorder.