The aim of this research was to prepare water-in-oil (W/O) emulsions encapsulating different concentrations of magnesium chloride (MgCl2) and to investigate the effect of W/O emulsions on the physical properties and microstructure of tofu. The results showed that the stability of W/O emulsions improved as the concentrations of polyglycerol polyricinoleate (PGPR) and MgCl2 increased. Dynamic viscoelastic measurements indicated that gelation time decreased with increasing MgCl2 concentration in W/O emulsions, suggesting a more rapid reaction between magnesium ions and protein molecules. As the concentration of MgCl2 in W/O emulsions increased, the yield and water content of tofu decreased, while the protein and crude fat contents and hardness values increased. At a concentration of 2.0M MgCl2 in W/O emulsion, the WHC and microstructure of the tofu samples were optimal. The variations in the physical properties of tofu were attributed to the concentration of magnesium ions and the coagulation rate.