Amyloid β (Aβ) skews microglia to M1 phenotype and induces inflammation and neurodegeneration. On the other hand, another type of microglia, M2, shows anti-inflammatory and neurotrophic effects. We previously clarified that HDAC3 inhibition induced predominance of M2 microglia and axonal growth. Therefore, this study aimed to clarify that HDAC3 inhibition skewed to M2 microglia and restored memory function in in vitro and in vivo Alzheimer’s disease models. As a result, RGFP966 skewed microglia from M1 to M2 in Aβ-treated cultured microglia. RGFP966 promoted secretion of factor A, which normalized morphology of axonal endings after Aβ treatment in cultured neurons. RGFP966 decreased degenerated axons and improved novel object recognition memory in a transgenic model of Alzheimer’s disease, 5XFAD mice. These results suggest that HDAC3 inhibition increased predominance of M2 microglia, recovered axonal degeneration, and ameliorated memory deficit in 5XFAD mice.