Microglial inflammation leads to the upregulation of proinflammatory cytokine and proinflammatory enzyme expression, resulting in inflammation‐induced neuronal cell apoptosis. Ketamine, an anesthetic mostly used in critical patients, has been reported to possess neuroprotective effects. However, the potential mechanism is still not well understood. In the present study, we investigated how ketamine attenuates lipopolysaccharide (LPS)‐mediated BV2 cell inflammation. LPS upregulated proinflammatory cytokine and proinflammatory enzyme expression, increased NF‐κB phosphorylation and nuclear translocation, and augmented calcium (Ca2+)/calmodulin‐dependent protein kinase II (CaMK II) phosphorylation and Ca2+ levels in BV2 cells. Ketamine could reverse these LPS‐induced effects. Furthermore, AP5, an inhibitor of NMDA receptors, inhibited LPS‐induced inflammatory effects in BV2 cells, which was similar to the effects of ketamine. Moreover, these effects of ketamine against LPS‐mediated inflammation in BV2 cells could be reversed by D‐serine, an activator of NMDA receptors. The present study suggests that ketamine, by inhibiting NMDA receptors, attenuating Ca2+ levels, and inhibiting CaMK II phosphorylation, NF‐κB phosphorylation and nuclear translocation, may ameliorate LPS‐mediated inflammation in BV2 cells.