Ferroelectric crystals display a macroscopic electric polarization, a superposition of many dipoles at the atomic scale that originate from spatially separated electrons and atomic nuclei. The macroscopic polarization is expected to change when the atoms are set in motion but the connection between polarization and atomic motions has remained unknown. A time-resolved X-ray experiment has revealed that tiny atomic vibrations shift negative charges over a distance 1000 times larger between atoms and switch the macroscopic polarization on a time scale of a millionth of a millionth of a second.