Heterotopic ossification (HO) is a common disease characterized by pain, dysfunction and calcification. The mechanisms underlying HO have not been completely elucidated. Palovarotene, a retinoic acid receptor γ agonist, significantly inhibits the formation of HO in vivo. However, its specific mechanism of action remains unclear. Therefore, we aimed to evaluate the signalling pathways related to the formation of HO as well as the mechanism of palovarotene action. We constructed in vitro and in vivo models of HO. Osteogenic differentiation of bone mesenchymal stem cells (BMSCs) was observed by alizarin red and alkaline phosphatase staining assays in vitro. X‐ray and haematoxylin–eosin staining were performed in vivo. Western blots and reverse transcription‐polymerase chain reaction were performed to determine the levels of osteogenic‐ and inflammation‐related genes. Immunofluorescence and immunocytochemistry were used to assess the levels of p65, the core molecule of the nuclear factor κ‐B (NF‐κB) signalling pathway. We demonstrated that, in vitro, under inflammatory stimulation, pathological calcium deposition increased in BMSCs. The levels of osteogenesis‐ and inflammation‐related genes were also upregulated, along with an enhanced expression of p65. Immunofluorescence assays revealed that p65 entered the nucleus, thereby stimulating the downstream effectors of the NF‐κB pathway. The above trends were reversed after palovarotene treatment. In conclusion, the NF‐κB signalling pathway played an important role in HO, and palovarotene could alleviate HO by blocking the NF‐κB cascade. Our results may provide a theoretical basis for palovarotene in the treatment of HO. Further studies on the side effects of palovarotene are warranted in the future.