Microalgae are a sustainable energy source because of their lipid storage capacity. However, the cultivation of microalgae requires optimization to produce a high biomass and lipid content. Stressing the cell is a common approach that is applied to increase the lipid content of the algae. Within this context, sodium chloride (NaCl) stress and magnesium (Mg2+) limitations were applied individually and mutually to understand their potential effects on biomass, lipid quantity, and the fatty acid methyl esters (FAME) profile of Auxenochlorella protothecoides. Saturated fatty acid (SFA) contents as high as 43.9% were obtained at 0 mg L-1 Mg2+ with 5 g L-1 NaCl. The highest linoleic acid content (35.2%) was obtained at 0.3 mg L-1 Mg2+ with 2.5 g L-1 NaCl. However, the highest biomass was achieved at 18.5 mg L-1 Mg2+ with 5.0 g L-1 NaCl according to surface response methodology. These optimization data could be useful for producing a feasible and sustainable biodiesel production strategy with high biomass and lipid productivity.