It is well known that many layered transition metal oxides can transform into a spinel structure upon repeated battery cycling, but a phase transition in the opposite direction is rare. Recently, the transformation from spinel Mn3O4 to layered MnO2 was observed during the operation of a Mg battery in aqueous conditions, resulting in high performance Mg batteries. We hereby use ab initio calculations to unveil the mechanism by which crystal water plays a critical role in this unique transformation. Once inserted into the spinel form, a water molecule donates an electron, offering a key structural and thermodynamic driving force to initiate the transformation process. These crystal water molecules then get favorably clustered into a planar form in the layered structure and act as a stabilizing agent for birnessite. Kinetically, the inserted crystal water dramatically promotes the necessary rearrangement of Mn during the transition by lowering the activation barrier by >2 eV. The present structural, thermodynamic and kinetic understanding of the crystal water-driven phase transition provides novel insights to further the design of related low dimensional hydrated materials for multi-valent cathodes.