Electricity-driven water splitting to produce hydrogen fuels and oxygen is considered among the most promising technologies for sustainable energy. Despite considerable progress over the past decade in this field, no water-splitting electrocatalyst with selectivity between the oxygen and hydrogen evolution reactions (OER and HER) has been reported so far, to the best of our knowledge. Here, we develop a unique, customizable watersplitting electrocatalyst by systematically modulating the doping of the nonmetal element sulfur (S) into cobalt molybdate using thioacetamide (TAA) as a sulfur precursor. The resultant S-doped cobalt molybdate electrocatalysts showed unexpectedly high selectivity, i.e., the OER and HER activities could be freely adjusted through tuning the sulfur doping level. In the case of a high TAA/cobalt molybdate mass ratio of 1.6, the S-doped sample was highly selective for HER, achieving an excellent electrocatalytic activity comparable to those of previously reported state-of-the-art transition-metal (Co, Ni, and Fe)-based HER electrocatalysts. In sharp contrast, when the TAA/cobalt molybdate mass ratio was as low as 0.4, the S-doped sample was remarkably selective for OER with outstanding catalytic activity that even outperformed the commercial RuO 2 catalyst.