Ca<sup>2+</sup> and Mg<sup>2+</sup> are the most dominating unavoidable ions in the smithsonite flotation. In this paper, the effect of Ca<sup>2+</sup> (Mg<sup>2+</sup>) on the surface of smithsonite sulfidization in a system where water molecules are present was investigated using density functional based tight binding (DFTB+) simulations for the first time. The results indicated that the adsorption of hydrated Ca<sup>2+</sup> complexes is stronger than that of hydrated Mg<sup>2+</sup> complexes on the hydrated smithsonite (101) surface. In addition, at low concentrations of sodium sulfide, there is no adsorption of HS- on the surface pre-adsorbed with hydrated Ca<sup>2+</sup> complexes, but only on the surface pre-adsorbed with hydrated Mg<sup>2+</sup> complexes. At high concentrations of Na<sub>2</sub>S, S<sup>2-</sup> weakens the adsorption of hydrated Ca<sup>2+</sup> complexes due to competitive adsorption, but the presence of S<sup>2-</sup> could desorb hydrated Mg<sup>2+</sup> complexes from the surface. The results compared the differences in effects of Ca<sup>2+</sup> and Mg<sup>2+</sup> on smithsonite sulfidization, which could provide an atomic scale basis for researching the surface sulfidization of oxide minerals.