Metallic 1T-MoS2 is a promising electrode material for supercapacitors applications. Its layered structure allows the efficient intercalation of ions, leading to experimental volumetric capacitance as high as 140 F/cm3. Molecular dynamics could in principle be used to characterize its charging mechanism, however, unlike conventional nanoporous carbon, 1T-MoS2 is a multi-component electrode. The Mo and S atoms have very different electronegativities, so that 1T-MoS2 cannot be simulated accurately using the conventional constant potential method. In this work, we show that controlling the electrochemical potential of the atoms allows to recover average partial charges for the elements in agreement with electronic structure calculations for the material at rest, without compromising the ability to simulate systems under an applied voltage. The simulations yield volumetric capacitances in agreement with experiments. We show that due to the large electronegativity of S, the co-ion desorption is the main charging mechanism at play during the charging process. This contrast drastically with carbon materials for which ion exchange and counter-ion adsorption usually dominate. In the future, our method can be extended to the study of a wide range family of 2D layered materials such as MXenes.