Magnesium ions have many cellular actions including the suppression of the excitability of neurons; however, the depolarization effect of magnesium ions seems to be contradictory. Thus several hypotheses have aimed to explain this effect. In this study, a quantum mechanical approach is used to explain the depolarization action of magnesium. The model of quantum tunneling of magnesium ions through the closed sodium voltage-gated channels was adopted to calculate the quantum conductance of magnesium ions, and a modified version of Goldman–Hodgkin–Katz equation was used to determine whether this quantum conductance was significant in affecting the resting membrane potential of neurons. Accordingly, it was found that extracellular magnesium ions can exhibit a depolarization effect on membrane potential, and the degree of this depolarization depends on the tunneling probability, the channels’ selectivity to magnesium ions, the channels’ density in the neuronal membrane, and the extracellular magnesium concentration. In addition, extracellular magnesium ions achieve a quantum conductance much higher than intracellular ones because they have a higher kinetic energy. This study aims to identify the mechanism of the depolarization action of magnesium because this may help in offering better therapeutic solutions for fetal neuroprotection and in stabilizing the mood of bipolar patients.