Water is one of the most important, yet least understood, liquids in nature. Many anomalous properties of liquid water originate from its well-connected hydrogen bond network1, including unusually efficient vibrational energy redistribution and relaxation2. An accurate description of the ultrafast vibrational motion of water molecules is essential for understanding the nature of hydrogen bonds and many solution-phase chemical reactions. Most existing knowledge of vibrational relaxation in water is built upon ultrafast spectroscopy experiments2–7. However, these experiments cannot directly resolve the motion of the atomic positions and require difficult translation of spectral dynamics into hydrogen bond dynamics. Here, we measure the ultrafast structural response to the excitation of the OH stretching vibration in liquid water with femtosecond temporal and atomic spatial resolution using liquid ultrafast electron scattering. We observed a transient hydrogen bond contraction of roughly 0.04 Å on a timescale of 80 femtoseconds, followed by a thermalization on a timescale of approximately 1 picosecond. Molecular dynamics simulations reveal the need to treat the distribution of the shared proton in the hydrogen bond quantum mechanically to capture the structural dynamics on femtosecond timescales. Our experiment and simulations unveil the intermolecular character of the water vibration preceding the relaxation of the OH stretch.