Magnesium - Wikipedia In the cosmos, magnesium is produced in large, aging stars by the sequential addition of three helium nuclei to a carbon nucleus When such stars explode as supernovas, much of the magnesium is expelled into the interstellar medium where it may recycle into new star systems