Spinal cord injury triggers complex pathological cascades, resulting in destructive tissue damage and incomplete tissue repair. Scar formation is generally considered a barrier for regeneration in the central nervous system. However, the intrinsic mechanism of scar formation after spinal cord injury has not been fully elucidated. Here, we report that excess cholesterol accumulates in phagocytes and is inefficiently removed from spinal cord lesions in young adult mice. Interestingly, we observed that excessive cholesterol also accumulates in injured peripheral nerves but is subsequently removed by reverse cholesterol transport. Meanwhile, preventing reverse cholesterol transport leads to macrophage accumulation and fibrosis in injured peripheral nerves. Furthermore, the neonatal mouse spinal cord lesions are devoid of myelin-derived lipids and can heal without excess cholesterol accumulation. We found that transplantation of myelin into neonatal lesions disrupts healing with excessive cholesterol accumulation, persistent macrophage activation, and fibrosis. Myelin internalization suppresses macrophage apoptosis mediated by CD5L expression, indicating that myelin-derived cholesterol plays a critical role in impaired wound healing. Taken together, our data suggest that the central nervous system lacks an efficient approach for cholesterol clearance, resulting in excessive accumulation of myelin-derived cholesterol, thereby inducing scar formation after injury.