Microglial phenotype alternation is a potential novel pathogenic mechanism for cerebral ischemia. Cerebral ischemia induced autophagy aggravates inflammation and neural injury. However, the effect of autophagy in the modulation of microglial phenotype is still unknown. In this study, we investigated the role of autophagic flux in the alternation of microglial phenotype following oxygen glucose deprivation/reperfusion (OGD/R) in BV-2 cells. Inhibition of autophagic flux by NH4Cl exposure significantly increased the level of microtubule-associated protein 1 light chain 3 (LC3)-II and p62 in control and OGD/R (12 h, 24 h and 48 h) groups, but did not change their expression in OGD/R 72 h group, indicating that autophagic flux was inhibited at OGD/R 72 h. Once autophagic flux was inhibited at OGD/R 72 h or at OGD/R 24 h (with NH4Cl), BV-2 cells mainly showed M1 phenotype with increased tumor necrosis factor alpha (TNF-α), inducible nitric oxide synthase (iNOS), cyclooxygenase-2 (COX-2), and decreased M2 markers including interleukin-10 (IL-10), Arginase 1 (Arg-1), and brain derived neurotrophic factor (BDNF). Further study indicated that inhibition of autophagic flux activated NF-κB pathway and decreased the activity of cAMP-response element binding protein (CREB), which contributed to the alternation of microglial phenotype. Therefore, inhibition of autophagic flux regulated the alternation of microglial phenotype by modulating the balance between NF-κB and CREB.