Tripartite motif-containing 21 (TRIM21) has been confirmed to mediate the production of inflammatory mediators via NF-κB signaling. However, the function of TRIM21 in microglia-mediated neuroinflammation remains unclear. This study aimed to explore the effect of TRIM21 on LPS-activated BV2 microglia and its underlying mechanism. BV2 cells exposed to lipopolysaccharide (LPS) were used to simulated neuroinflammation in vitro. Loss-of-function and gain-of-function of TRIM21 in BV2 cells were used to assess the effect of TRIM21 on LPS-induced neuroinflammation. BV2 microglia and HT22 cells co-culture system were used to investigate whether TRIM21 regulated neuronal inflammation-mediated neuronal death. TRIM21 knockdown triggered the polarization of BV2 cells from M1 to M2 phenotype. Knockdown of TRIM21 reduced the secretion of TNF-α, IL-6, and IL-1β, while increased the content of IL-4 in LPS-treated cells. Knockdown of TRIM21 inhibited the expression of p65 and the binding activity of NF-κB-DNA. Additionally, TRIM21 siRNA eliminated the increase in NLRP3 and cleaved caspase-1 proteins expression and caspase-1 activity induced by LPS. TRIM21 knockdown could resist cytotoxicity induced by activated microglia, including increasing the viability of co-cultured HT22 cells and reducing the emancipation of LDH. Moreover, the increased apoptosis and caspase-3 activity of HT22 neurons induced by activated BV2 cells were blocked by TRIM21 siRNA. Blocking of NF-κB abolished the effect of TRIM21 in promoting the expression of M1 phenotype marker genes. Similarly, the blockade of NF-κB pathway eliminated the promotion of TRIM21 on neurotoxicity induced by neuroinflammation. TRIM21 knockdown suppressed the M1 phenotype polarization of microglia and neuroinflammation-mediated neuronal damage via NF-κB/NLRP3 inflammasome pathway, which suggested that TRIM21 might be a potential therapeutic target for the therapy of central nervous system diseases.