Objective To investigate the improvement effect of massage on chronic pain in a rat model of lumbar disc herniation (LDH) and its mechanism. Methods (1) A total of 42 male SD rats were randomly divided into blank group, sham operation group, model group, sham massage group, massage group, miRNA⁃27a over⁃expression group, or negative control (NC) group, with 6 rats in each group. Among them, the sham operation group underwent surgical exposure of the dorsal root ganglion, the blank group received no intervention, and the remaining 5 groups were used to establish a LDH chronic inflammation model, namely the chronic compression of dorsal root ganglion model. (2) After successful modeling, the massage group received massage therapy, while the sham massage group was only stroked lightly on the affected limb, for 14 consecutive days of intervention. The blank group, sham operation group, and model group received no intervention. Before modeling and at 1, 7, and 14 days after modeling, behavioral tests were performed on the rats in each group, and the paw thermal withdrawal latency (PTWL) and paw mechanical withdrawal threshold (PMWT) were compared between the 5 groups. At 14 days after modeling, the levels of serum tumor necrosis factor α (TNF⁃α), interleukin (IL)⁃6, and IL⁃1β were detected by ELISA. Real⁃time fluorescence quantitative PCR was used to detect the expressions of miR⁃27a, Toll⁃like receptor 4 (TLR4) mRNA, and IL⁃1 receptor⁃associated kinase 4 (IRAK4) mRNA in dorsal horn tissue of the spinal cord. (3) Before 1 day and after 1, 7, and 14 days of modeling, rats in the miR⁃27a over⁃expression group and the NC group were given intrathecal injection of agomir⁃27a⁃3p lentivirus and agomir⁃27a⁃3p NC lentivirus, respectively. Before modeling and at 1, 7, and 14 days after modeling, the PTWL and PMWT were compared between rats of the two groups. Results (1) After 1, 7, and 14 days of modeling, compared with the blank group and sham operation group, the model group exhibited shorter PTWL and decreased PMWT (P<0.05). After 7 and 14 days of modeling, the massage group yielded longer PTWL and higher PMWT as compared with the model group, but shorter PTWL and lower PMWT as compared with the sham massage group (P<0.05). At 14 days after modeling, the expressions of miR⁃27a, TLR4 mRNA, and IRAK4 mRNA in dorsal horn tissue of the spinal cord, as well as the levels of serum TNF⁃α, IL⁃6, and IL⁃1β of the model group were higher than those of the blank group and the sham operation group (P<0.05). The expression of miR⁃27a in dorsal horn tissue of the spinal cord in the massage group was higher than that in the model group and the sham massage group, while the mRNA expressions of TLR4 and IRAK4 and the levels of serum TNF⁃α, IL⁃6, and IL⁃1β were lower than those of the model group and the sham massage group (P<0.05), whereas there was no statistically significant difference in the aforementioned indices between the model group and the sham massage group (P>0.05). (2) After 7 and 14 days of modeling, the miR⁃27a over⁃expression group exhibited longer or higher PTWL or PMWT as compared with the NC group (P<0.05). Conclusion Massage can alleviate chronic pain in LDH, and its mechanism may be related to upregulating miR⁃27a expression, inhibiting the activation of the TLR4/NF⁃κB signaling pathway, and thereby reducing the release of inflammatory factors, thus achieving anti⁃inflammatory and analgesic effects.