We found that STING inhibitor H151 could significantly decrease phagocytosis-related molecules and suppress microglia eliminating synapses around the infarcted cortex, which promoted the preservation of ischemia-affected synapses and enhanced the recovery of stroke-induced motor dysfunction. The gene discussed is STING1; the disease is stroke disorder.