Nerve regeneration in adult mammalian spinal cord is poor because of the lack of intrinsic regeneration of neurons and extrinsic factors-the glial scar, triggered by injury and exerting confusing inhibiting or promoting regeneration function. Recent technological advancements in spatial transcriptomics (ST) provide a unique opportunity to decipher all or most genes systematically throughout scar formation, which remains poorly understood. Herein, we firstly constructed tissue-wide gene expression patterns of mouse spinal cords over the course of scar formation using ST after spinal cord injury (SCI) based on the transcriptomes from 32 samples. Locally, we identified gene expression gradients from leading edge to the core of scar areas that allow for re-understanding of the scar microenvironment, such as neurotransmitter disorder, activation of proinflammatory response, neurotoxic saturated lipids, angiogenesis, obstructing axon extension and extracellular structure re-organization. Additionally, we identified 21 cell types during scar formation and delineated the origin, functional diversity and the possible trajectory between subpopulations of fibroblast, glia and immune cell. Specially, we found some regulators in special cell types, such as Thbs1 and Col1a2 in macrophage, CD36 and Postn in fibroblast, Plxnb2 and Nxpe3 in microglia, Clu in astrocyte and CD74 in oligodendrocyte. Subsequently, we accurately defined the extent of scar boundary and profiled the bidirectional ligand-receptor interactions at the neighbor cluster boundary, contributing to maintain scar architecture during gliosis and fibrosis, and found GPR37L1_PSAP and GPR37_PSAP were the most significant gene-pairs between microglia, fibroblasts and astrocytes. Last, we quantified the fraction of scar-resident cell and defined four phases of the scar formation: macrophage infiltration, proliferation and differentiation of scar-resident cells, scar emergence and scar stationary. Together, the establishment of these profiles firstly uncovered scar spatial heterogeneity and lineage trajectory, provide an unbiased view of scar and served as a valuable resource for the central nervous system (CNS) injury treatment.