The reactive surface sites of MoS<sub>2</sub> hydrotreating catalysts (unpromoted as well as Co- and Ni-promoted) supported on MgAl<sub>2</sub>O<sub>4</sub> spinel were investigated with respect to the substitution of sulfur by oxygen using in situ XAS coupled with modulation excitation spectroscopy (MES). Specifically, MES experiments were carried out by periodically cycling between a H<sub>2</sub>O and H<sub>2</sub>S containing hydrogen gas mixture at 400 °C. Due to the low fraction of S–O exchange, conventional XANES and EXAFS data hardly showed any changes when these catalysts were exposed to increasing ratios of H<sub>2</sub>O to H<sub>2</sub>S in an H<sub>2</sub> atmosphere. XANES and EXAFS data extracted at the Mo K-edge by MES analysis showed that for approximately 1% of the Mo atoms, sulfur atoms are replaced by oxygen atoms when exposed to H<sub>2</sub>O, causing partial oxidation of these active sites. The reaction is reversible and Mo returns to its initial sulfide phase when H<sub>2</sub>O is removed and H<sub>2</sub>S is supplied in the feed. In the case of Co- and Ni-promoted catalysts, the magnitude of S–O exchange was found to be reduced, indicating the beneficial effect of promotion. MES at the Ni K-edge showed that Ni was oxidized during H<sub>2</sub>O exposure, which in turn delayed the Mo oxidation in the Ni-promoted catalyst. The structures of these catalysts under S–O exchange were modeled using density functional theory (DFT) calculations, showing that the edge atoms are affected strongly. For all three catalysts, OH substitution is more favorable, while O substitution could be possible at high H<sub>2</sub>O pressure for unpromoted MoS<sub>2</sub>. Mo K-edge XANES spectra calculated using these simulated structures support the results obtained from the MES experiments. The presented approach using MES in combination with XAS and supported by DFT can be extended in general to catalysts under operando conditions and is thus a useful tool for determination of the active site on an atomic-scale.