Histone deacetylase inhibitors (HDACi) are a promising therapeutic intervention for stroke. The involvement of the anti-inflammatory effects of HDACi in their neuroprotection has been reported, but the underlying mechanisms remain uncertain. Because post-stroke inflammation is a time-dependent process starting with acute and intense inflammation and followed by prolonged and mild inflammation, we proposed whether targeting the early inflammatory response could achieve the neuroprotection of HDACi. To test this hypothesis, a single dose of suberoylanilide hydroxamic acid (SAHA) (50 mg/kg), a pan-HDACi, was intraperitoneally (i.p.) injected immediately or 12 h after ischemia onset in a transient middle cerebral artery occlusion (tMCAO) mouse model. Compared with delayed injection, immediate SAHA treatment provided more protection, evidenced by a smaller infarction volume and better outcome. This protection was accompanied by suppression of pro-inflammatory cytokines and reduction of activated microglia in the early stage of post-stroke inflammation. Moreover, SAHA treatment suppressed M1 cytokine expression (IL-6, TNF-α, and iNOS) while promoting the transcription of M2 cytokines (Arg-1 and IL-10) in LPS-challenged mouse microglia, and enhanced CD206 (M2 marker) but decreased CD86 (M1 markers) levels in microglia isolated from the ipsilateral hemisphere of MCAO mice. Collectively, our data suggested that the protection of SAHA during ischemic brain injury was closely associated with its inhibition in the early inflammatory response, and this inhibition was related to its reducing microglia activation and priming the activated microglia toward a more protective phenotype.