Here, we illustrate what happens inside the catalytic cleft of an enzyme when substrate or ligand binds on single-millisecond timescales. The initial phase of the enzymatic cycle is observed with near-atomic resolution using the most advanced X-ray source currently available: the European XFEL (EuXFEL). The high repetition rate of the EuXFEL combined with our mix-and-inject technology enables the initial phase of ceftriaxone binding to the Mycobacterium tuberculosis β-lactamase to be followed using time-resolved crystallography in real time. It is shown how a diffusion coefficient in enzyme crystals can be derived directly from the X-ray data, enabling the determination of ligand and enzyme–ligand concentrations at any position in the crystal volume as a function of time. In addition, the structure of the irreversible inhibitor sulbactam bound to the enzyme at a 66 ms time delay after mixing is described. This demonstrates that the EuXFEL can be used as an important tool for biomedically relevant research.