Environmental enrichment (EE) is a generally accepted strategy to promote stroke recovery and its beneficial effect is positively correlated with neuroplasticity. However, the mechanisms underlying it remain elusive. Histone deacetylase 2 (HDAC2), a negative regulator of neuroplasticity, is up-regulated after stroke. Thus, we hypothesized that HDAC2 may participate in EE-mediated stroke recovery. In this study, focal stroke was induced by photothrombosis in male mice exposing to EE or standard housing (SH) conditions. Recombinant virus vectors, including Ad-HDAC2-Flag, AAV-CAG-EGFP-Cre, LV-shHDAC2, or their controls were microinjected into the motor cortex at 3 days before stroke. Grid-walking and cylinder tasks were conducted to assess motor function. Western blot and immunostaining were used to uncover the mechanisms underlying EE-mediated stroke recovery. We found that EE exposure reversed stroke-induced HDAC2 up-regulation, implicating HDAC2 in EE-mediated functional recovery. Importantly, EE-dependent stroke recovery was counteracted by over-expressing HDAC2, and HDAC2 knockdown promoted functional recovery from stroke to the similar extent as EE exposure. Moreover, the knockdown of HDAC2 epigenetically enhanced expressions of neurotrophins and neuroplasticityrelated proteins, with similar effects as EE, and consequently, whole brain and corticospinal tract (CST) rewiring. Together, our findings indicate that HDAC2 is critical for EE-dependent functional restoration. Precisely targeting HDAC2 may mimic EE and serve as a novel therapeutic strategy for stroke recovery.