In this study, the effects of Mg on the formation of He bubbles and diffusion behavior of He atoms in cubic silicon carbide (3C-SiC) were investigated by irradiation and annealing experiments as well as first-principles calculations. TEM results indicated that two damage bands were formed in He&Mg irradiated SiC. During annealing, Mg could prevent He atoms from diffusing to the surface, resulting in the formation of the He bubbles in the deeper areas far from Mg-implanted regions, which is helpful in avoiding surface blisters. First-principles calculations were then performed to explore the effects of Mg on the He behavior in SiC. The solution energy, binding energy charge density, bond length, and crystal orbital Hamiltonian population of these elements were calculated to identify their states. The results suggested that the binding capacity between He and Mg was weak, and Mg could increase the diffusion energy barrier of He. Ab initio molecular dynamics (AIMD) simulation showed that Mg could make He in a high-energy unstable state, and force He atom to move toward the vacancy away from Mg, which explains the experimental results.