Back diffused draw salt affects the anaerobic digestion performance in a forward osmosis membrane bioreactor. Previous studies have established the influence of MgCl2 on sludge anaerobic digestion; however, its effects on individual phases, such as hydrolysis, acidogenesis, and methanogenesis remain unclear. This study investigates the influence of different concentrations of MgCl2 on these stages of anaerobic digestion and compares variations in methane production under different substrates. The findings demonstrate that adding MgCl2 significantly enhances sludge hydrolysis. At a concentration of 50 g/L, the soluble chemical oxygen demand increases by 265.2 %, although with unstable reactions. MgCl2 significantly affects the production of fatty acids. Specifically, the production of acids was enhanced when the concentration of MgCl2 was below 20 g/L, while it was inhibited when the concentration exceeded 50 g/L. The highest concentration of acetic acid recorded is 1991.28 mg/L, which represents an 83.5 % increment. In contrast, methane production shows a higher susceptibility to MgCl2, experiencing inhibition at concentrations exceeding 1 g/L. The inhibitory concentration for methane production is lower than for acid production. The study also observes significant differences in microbial structure, particularly in Methanogen. When using different substrates, the predominant orders of methanogen are Methanobacteriales for tests with acid solution as a feed and Methanosarcinales for tests with waste sludge as a feed, respectively. Analyses of metabolic pathways reveal that carbon dioxide and acetic acid are the most prevalent pathways in terms of abundance. In summary, MgCl2 has varying effects on various stages of anaerobic digestion of sludge.