In order to explore the influence of different magnesium content on primary carbides in 21-4N valve steel,21-4N valve steel with different magnesium content was smelted in a laboratory high temperature resistance furnace,and the research was carried out by use of Zeiss metallographic micro-scope,scanning electron microscope and electrolytic corrosion.The results show that with the increase of Mg content in 21-4N steel,both the average maximum size and area ratio of carbides firstly decrease and then increase.The addition of trace magnesium is helpful to improve the size and distribution of Cr-rich precipitated carbides in steel.When the mass fraction of magnesium is 1.6x10-5,the average max-imum size of precipitated carbides is 60.55 μm and its area ratio is 10.43%,and most of them are granu-lar in steel,and the continuity is destroyed.The reason is that the segregation of magnesium at the grain boundary can inhibit the diffusion of alloy elements such as C and Cr,and then block the continuous growth of carbide,thus achieving the effect of refining the carbide size.