The use of Mg in rechargeable batteries can be competitive with Li in terms of economy, safety, environment and capacity. In contrast to lithium and sodium, the compounds with NASICON-type structure have received little attention as hosts for reversible magnesium insertion. The selection of the electrolyte solution and voltage window seems to be crucial for controlling sodium/magnesium (de)insertion. Here, Na3V2(PO4)3 (NVP) has been tested as a positive electrode vs. Mg metal with 0.5M magnesium bis(trifluoromethanesulfonimide) in 1,2-dimethoxyethane as electrolyte solution, and the mechanism of the charge/discharge process has been studied. In magnesium cell, firstly sodium is partially deinserted from the framework of NVP up to ca. Na1.3V2(PO4)3 through a single voltage-plateau at 1.7V, the cell of the crystal lattice is contracted, and a magnesium-sodium hybrid electrolyte is formed in situ. Secondly, sodium and magnesium are inserted through two consecutive voltage-plateaus at 1.6 and 1.2V, respectively, while the main framework is preserved and the lattice is expanded. With further charge-discharge cycling, only one discharge plateau is observed at 1.2V due to insertion of magnesium. If sodium ions are removed from the electrolyte solution after the first charge, only magnesium is inserted in the NASICON-type framework during the discharge. The electrochemical behavior of this material as electrode in magnesium battery is very promising, providing a reversible capacity of ca. 60mAhg−1 after 100 cycles.