The immune system is not only essential for host defense, but it is also involved in tissue maintenance and disease pathogenesis. Macrophages play a key role in tissue repair, fibrosis, and tumorigenesis, but the mechanisms underlying their multifunctionality have not been fully explored. Here, we identified Mrep (Ly6ChiCX3CR1loPDPN+CD9+) as a crucial subset of macrophages for muscle regeneration after muscle injury. Muscle regeneration required Mrep-derived activin A, which was produced via the TLR4/TIR domain-containing adapter-inducing interferon-β/TANK-binding kinase 1/interferon regulatory factor 3/7 signaling pathway in response to muscle injury. Mrep exerted pathological effects by secreting activin A in a model of genetically induced heterotopic ossification (HO), which was suppressed by TLR4 inhibition. Thus, this study elucidates the context-dependent functions of macrophages and the link between injury and HO, suggesting that Mrep is a potential therapeutic target for regenerating muscles and suppressing HO.