Pressure-induced phase transition in MgS is studied using a constant pressure ab initio molecular dynamics method, and a solid evidence of existence of its high-pressure phase is provided. As predicted by total energy calculations, MgS undergoes a structural phase transformation from the rocksalt structure to a CsCl-type structure under hydrostatic pressure. The transformation mechanism is characterized, and two intermediate phases having P4/nmm and P2(1)/m symmetries for the rocksalt-to-CsCl-type phase transformation of MgS are proposed, which is different from the previously proposed mechanisms. We also study this phase transition using the total energy calculations. Our predicted transition parameters and bulk properties are in good agreement with the earlier first principle simulations.