Interfacial magnetism emerging from orbital hybridization is the key facilitator for practical nanoscale spintronic devices. Most devices require a capping layer, and it is widely assumed that capping-layer variations do not change the fundamental properties of magnetic films underneath. In a model $\mathrm{Co}\text{\ensuremath{-}}\mathrm{Fe}\text{\ensuremath{-}}\mathrm{B}/\mathrm{Mg}\mathrm{O}$ system, interfacial investigations, so far, have been focused on the hybridization of $\mathrm{Fe}$ d and $\mathrm{O}$ p orbitals. However, the role of the capping layer has largely been ignored by adopting a reductionist scenario of just oxidation or charge modification. Here, we report strong modifications of interfacial magnetism in $\mathrm{Co}\text{\ensuremath{-}}\mathrm{Fe}\text{\ensuremath{-}}\mathrm{B}/\mathrm{Mg}\mathrm{O}$ by systematically changing the $\mathrm{Ru}$ capping thickness using element-specific x-ray magnetic circular dichroism and x-ray absorption spectroscopy at $\mathrm{Fe}$ ${L}_{2,3}$, $\mathrm{Co}$ ${L}_{2,3}$, and $\mathrm{O}$ K edges, along with corresponding spin and orbital magnetic moment calculations and magnetometry measurements. We observe unusual spin-flip-like transitions due to capping layers and find direct evidence for systematic spin and orbital modifications, beyond just charge transformation, strikingly captured by oxygen x-ray absorption and dichroism spectra. Our result shows the importance of the capping layer and provides a complete picture of rich interfacial magnetism in the $\mathrm{Co}\text{\ensuremath{-}}\mathrm{Fe}\text{\ensuremath{-}}\mathrm{B}/\mathrm{Mg}\mathrm{O}$ system.