Heterotopic ossification (HO) is defined as the formation of bone tissues outside the bones, such as in the muscles. Currently, the mechanism of HO is still unclear. Tendon stem cells (TSCs) play important roles in the occurrence and development of HO. The inflammatory microenvironment dominated by macrophages also plays an important role in the course of HO. The commonly used clinical treatment methods, such as nonsteroidal anti-inflammatory drugs and radiotherapy, have relatively large side effects, and more efficient treatment methods are needed in clinical practice. Under physiological conditions, retinoic acid receptor (RAR) signal transduction pathway inhibits osteogenic progenitor cell aggregation and chondrocyte differentiation. We focus on palovarotene, a retinoic acid γ-receptor activator, showing an inhibitory effect on HO mice, but the specific mechanism is still unclear. This study was aimed at exploring the specific molecular mechanism of palovarotene by blocking osteogenic differentiation and HO formation of TSCs in vitro and in vivo in an inflammatory microenvironment. We constructed a coculture model of TCSs and polarized macrophages, as well as overexpression and knockdown models of the Smad signaling pathway of TCSs. In addition, a rat model of HO, which was constructed by Achilles tendon resection, was also established. These models explored the role of inflammatory microenvironment and Smad signaling pathways in the osteogenic differentiation of TSCs which lead to HO, as well as the reversal role played by palovarotene in this process. Our results suggest that, under the stimulation of inflammatory microenvironment and trauma, the injured site was in an inflammatory state, and macrophages were highly concentrated in the injured site. The expression of osteogenic and inflammation-related proteins, as well as Smad proteins, was upregulated. Osteogenic differentiation was performed in TCSs. We also found that TCSs activated Smad and NF-κB signaling pathways, which initiated the formation of HO. Palovarotene inhibited the aggregation of osteogenic progenitor cells and macrophages and attenuated HO by blocking Smad and NF-κB signaling pathways. Therefore, palovarotene may be a novel HO inhibitor, while other drugs or antibodies targeting Smad and NF-κB signaling pathways may also prevent or treat HO. The expressions of Smad5, Id1, P65, and other proteins may predict HO formation.