Large non-metallic inclusions affect the mechanical properties and service life of nickel-based superalloys. This study investigates the effects of magnesium elements on non-metallic inclusions in K4169 nickel-based superalloys, exploring the formation mechanisms and aggregation relationships of the inclusions. Four gradients of the magnesium content were used to simulate the erosion of MgO refractories on inclusions in the vacuum induction melting of nickel-based superalloys. The observed inclusions mainly comprised MgO, TiN, MgAl2O4, and MgAl2O4–TiN composites. To study the formation mechanism of inclusions in Ni-based alloys with different Mg contents, the predominance diagram of Mg–Al–Ti–O inclusions in nickel-based superalloy systems was calculated using Factsage thermodynamics software and classical thermodynamics separately. The aggregation behavior of MgAl2O4 and MgO inclusions on the surface of molten nickel-based superalloys was observed in situ under a high-temperature confocal laser scan microscope. The capillary force acting on inclusions in nickel-based superalloys was calculated using the Kralchevsky–Paunov model (K–P model), the calculation was verified with experimental results, and the influencing factors were analyzed. The capillary force acting on inclusions on the surface of molten nickel-based superalloys weakened in the order of MgAl2O4 > MgO > Al2O3, which is the opposite of the order for the force acting on inclusions in molten steel. Minimizing the magnesium content in the alloy is crucial to preventing the formation of large inclusions in nickel-based superalloys, and the use of magnesium-containing materials in the smelting process should thus be avoided.