Pathological β-amyloid (Aβ)-induced microglial activation could cause chronic neuroinflammation in the brain of Alzheimer's disease (AD) patients, and has been considered as one of the main pathological events of this disease. Chicago sky blue 6B (CSB6B), a pigment used in biochemical staining, has been reported to produce analgesic effects in neuroinflammatory-associated pain models. We have previously found that CSB6B could directly inhibit Aβ aggregation and prevent Aβ toxicity in neurons. However, it remains unclear whether this compound could prevent Aβ-induced neuroinflammation and impairments of learning and memory in the AD models. In this study, CSB6B was found to effectively inhibit the production of pro-inflammatory cytokines, including tumor necrosis factor-α and interleukin-1β, without affecting cell viability in BV2 microglia cells stimulated by Aβ oligomer and lipopolysaccharide. Moreover, CSB6B significantly reduced mRNA expression of inducible nitric oxide synthase and increased mRNA expression of arginase-1, suggesting that CSB6B might promote the polarization of BV2 cells into M2 phenotype. In Aβ oligomer-treated mice, hippocampal injection of CSB6B prevented cognitive impairments, and attenuated pro-inflammatory cytokines production. In addition, CSB6B inhibited nuclear transcription factor-κB (NF-κB), and restrainedthe activation of NOD-like receptor pyrin domain containing-3 (NLRP3) both in vitro and in vivo. According to our results, CSB6B may counteract Aβ-induced cognitive impairments and neuroinflammation by inhibiting NF-κB and NLRP3. Combined with previous studies, we anticipated that CSB6B may further develop into a potential anti-AD drug with multiple functions on neurons and microglia cells, concurrently.