Deep tooth decay approaching the pulp may develop into pulpitis; to prevent this, pulp cells need to balance the rapid immune response to avoid rapid swelling of the pulp. Current treatment of deep decay that approaches the pulp involves the application of drugs that induce low‐level inflammation in the dental pulp to promote its repair, but this treatment is sometimes insufficient. However, the unsuccessful treatment often resulted in pulpitis. The C5a‐C5aR is the initial stage of the immune cascade response. Blocking the binding of C5a‐C5aR can slow the immune response in the narrow pulp cavity, so that dental pulp cells have enough time to proliferate, migrate, and differentiate. In this study, we compared lipoteichoic acid (LTA) and lipopolysaccharides (LPS) at different concentrations and time points and used the C5aR antagonist W54011 to block the C5a‐C5aR axis. The blocking effect was detected by analyzing the expression of C5a, C5aR, interleukin (IL)‐6, and Toll‐like receptors 2 and 4 (TLR‐2, 4). Next, we determined the optimal concentration and duration of LTA and LPS treatment in combination with W54011. Based on our results, we selected 1.0 μg·mL−1 LPS treatment for 48 h to generate an inflammatory model of human dental pulp cells. We then regrouped the cells and conducted expression analyses to monitor the expression of C5a, C5aR, IL‐6, and TLR‐4 at the protein and mRNA levels. LPS stimulation for 48 h and treatment with W54011 for 48 h effectively inhibited inflammation and did not affect C5a expression. This study provides a basis for follow‐up studies of W54011 in dental pulp cells.