Peritendinous adhesion that forms after tendon injury substantially limits daily life. The pathology of adhesion involves inflammation and the associated proliferation. However, the current studies on this condition are lacking, previous studies reveal that cyclooxygenase‐2 (COX2) gene inhibitors have anti‐adhesion effects through reducing prostaglandin E2 (PGE2) and the proliferation of fibroblasts, are contrary to the failure in anti‐adhesion through deletion of EP4 (prostaglandin E receptor 4) gene in fibroblasts in mice of another study. In this study, single‐cell RNA sequencing analysis of human and mouse specimens are combined with eight types of conditional knockout mice and further reveal that deletion of COX2 in myeloid cells and deletion of EP4 gene in sensory nerves decrease adhesion and impair the biomechanical properties of repaired tendons. Furthermore, the COX2 inhibitor parecoxib reduces PGE2 but impairs the biomechanical properties of repaired tendons. Interestingly, PGE2 local treatment improves the biomechanical properties of the repaired tendons. These findings clarify the complex role of PGE2 in peritendinous adhesion formation (PAF) and tendon repair.