GCr15 bearing steel has higher carbon and chromium content, large-size primary carbides tend to be easily precipitated during the solidification, which is harmful for the performance of steel. Hence, magnesium treatment was applied to refine primary carbides and the influence of magnesium on the size, distribution and morphology of primary carbides in GCr15 bearing steel was studied in this paper. The results indicated that M3C, M3C2, and M7C3 were precipitated during the solidification of GCr15 bearing steel. When magnesium was added into the steel, the area ratio and maximum size of primary carbide were decreased with the increase of magnesium content. The refinement of primary carbides was the most obvious when the magnesium content was 27 ppm. Compared with the steel without magnesium, the area ratio and maximum size of primary carbides were reduced by 2.41 % and 11.16μm respectively. In addition, for the steel without magnesium, MnS were likely to be attached with primary carbides. Once magnesium was added, smaller and two-layer structured composite inclusions (the inner layer was Mg-Al-O, and the outer layer was MnS) were formed and provided the preferred nucleation site for primary carbides, which ultimately promoted the refinement of primary carbides.