Electrochemical recovery of phosphorous and nitrogen from wastewater as struvite (NH4MgPO4.6H2O) is progressively gaining importance as one of the innumerable pathways of sustainable development. However, the optimal range of anode potential that maximizes struvite purity under varied parametric conditions of pH and ion concentrations other than NH4 +and PO4 -3 has not been methodically explored so far. Additionally, corrosion behavior of a sacrificial magnesium anode under an anode potential range needs to be investigated because according to techno-economic feasibility criterion, it is advantageous to produce struvite with minimal consumption of magnesium. In this study, we will report on the effects of pH (4 and 8) and chloride ion concentration (0.1 M to 1 M) on struvite production and magnesium dissolution rates through performing a systematic investigation using Linear Sweep Voltammetry (LSV) and Potentiodynamic Polarization (PDP) techniques. Aqueous solutions of dihydrogen ammonium phosphate with varied chloride ion concentration are used as simulated wastewater. Electrochemical experiments are conducted in batch mode with a sacrificial magnesium anode and a stainless-steel cathode. Furthermore, bulk and electrode surface (both anode and cathode) precipitates are analyzed for elemental composition, crystallinity,and morphological features. The present research outcomes are expected to serve as a baseline protocol to select an optimal anode potential window in electrochemical struvite production from wastewater.