Previous studies demonstrated that estrogen receptor β (ERβ) signaling alleviates systemic inflammation in animal models, and suggested that ERβ-selective agonists may deactivate microglia and suppress T cell activity via downregulation of nuclear factor κ-light-chain-enhancer of activated B cells (NF-κB). In the present study, the role of ERβ in lipopolysaccharide (LPS)-induced inflammation and association with NF-κB activity were investigated in PC-3 and DU145 prostate cancer cell lines. Cells were treated with LPS to induce inflammation, and ELISA was performed to determine the expression levels of inflammatory cytokines, including tumor necrosis factor-α (TNF-α), monocyte chemoattractant protein 1 (MCP-1), interleukin (IL)-1β and IL-6. MTT and Transwell assays, and Annexin V/propidium iodide staining were conducted to measure cell viability, apoptosis and migration, respectively. Protein expression was determined via western blot analysis. LPS-induced inflammation resulted in elevated expression levels of TNF-α, IL-1β, MCP-1 and IL-6 compared with controls. ERβ overexpression significantly inhibited the LPS-induced production of TNF-α, IL-1β, MCP-1 and IL-6. In addition, the results indicated that ERβ suppressed viability and migration, and induced apoptosis in prostate cancer cells, which was further demonstrated by altered expression of proliferating cell nuclear antigen, B-cell lymphoma 2-associated X protein, caspase-3, E-cadherin and matrix metalloproteinase-2. These effects were reversed by treatment with the ERβ antagonist PHTPP or ERβ-specific short interfering RNA. ERβ overexpression reduced the expression levels of p65 and phosphorylated NF-κB inhibitor α (IκBα), but not total IκBα expression in LPS-treated cells. In conclusion, ERβ suppressed the viability and migration of the PC-3 and DU145 prostate cancer cell lines and induced apoptosis. Furthermore, it reduced inflammation and suppressed the activation of the NF-κB pathway, suggesting that ERβ may serve roles as an anti-inflammatory and anticancer agent in prostate cancer.