The effect of hydrogen on the interaction between dislocations and other elastic centers (impurity atoms and dislocations) in 310 S stainless steel and high-purity aluminum has been directly observed during deformation experiments in situ in an environmental cell transmission electron microscope. In 310 S stainless steel, the presence of hydrogen was observed to reduce the elastic interactions between obstacles and perfect and partial dislocations; thus, enhancing the mobility of the dislocations. In high-purity aluminum, the introduction and removal of hydrogen from the system was observed to cause a reversal in the direction of motion of the dislocations piled up against a barrier; consistent with a reduction of the elastic interactions by solute hydrogen. These observations provide direct support for the hydrogen shielding mechanism that has been proposed to account for the observed hydrogen-enhanced mobility of dislocations.