Piperine, an important natural product, has a good anti-inflammatory effect. However, few researchers have studied its mechanism in these pathways. The objective of this research was to evaluate the molecular mechanism underlying the anti-inflammatory responses of piperine in lipopolysaccharide (LPS)-stimulated RAW264.7 cells. The purification and characterization of piperine from Piper nigrum L. were determined by HPLC, UPLC-Q-TOF-MS and 1H NMR. Then, the anti-inflammatory activity was evaluated by a reagent test kit, ELISA kits, RT-PCR and Western blot experiments. The results suggested that piperine (90.65 ± 0.46% purity) at a concentration of 10–20 mg/L attenuated the production of NO and ROS, downregulated the protein and mRNA expression levels of TNF-α, IL-1β and IL-6, and upregulated the protein and mRNA transcription levels of IL-10. Meanwhile, the Western blot results indicated that piperine could inhibit the phosphorylation levels of the ERK, JNK, p38 and p65 proteins. Our findings suggest that piperine is a potential anti-inflammatory substance, whose molecular mechanism may be to regulate the key factors of the NF-κB and MAPK signalling pathways.