NG2 cells, a fourth glial cell type in the adult mammalian central nervous system, produce oligodendrocytes in the healthy nervous tissue, and display wide differentiation potential under pathological conditions, where they could give rise to reactive astrocytes. The factors that control the differentiation of NG2 cells after focal cerebral ischemia (FCI) are largely unknown. Here, we used transgenic Cspg4‐cre/Esr1/ROSA26Sortm14(CAG‐tdTomato) mice, in which tamoxifen administration triggers the expression of red fluorescent protein (tomato) specifically in NG2 cells and cells derived therefrom. Differentiation potential (in vitro and in vivo) of tomato‐positive NG2 cells from control or postischemic brains was determined using the immunohistochemistry, single cell RT‐qPCR and patch–clamp method. The ischemic injury was induced by middle cerebral artery occlusion, a model of FCI. Using genetic fate‐mapping method, we identified sonic hedgehog (Shh) as an important factor that influences differentiation of NG2 cells into astrocytes in vitro. We also manipulated Shh signaling in the adult mouse brain after FCI. Shh signaling activation significantly increased the number of astrocytes derived from NG2 cells in the glial scar around the ischemic lesion, while Shh signaling inhibition caused the opposite effect. Since Shh signaling modifications did not change the proliferation rate of NG2 cells, we can conclude that Shh has a direct influence on the differentiation of NG2 cells and therefore, on the formation and composition of a glial scar, which consequently affects the degree of the brain damage.