The phenomenon of spin resonance has had far-reaching influence since its discovery 70 years ago1. Electron spin resonance driven by high-frequency magnetic fields has enhanced our understanding of quantum mechanics, and finds application in fields as diverse as medicine and quantum information2. Spin resonance can also be induced by high-frequency electric fields in materials with a spin–orbit interaction; the oscillation of the electrons creates a momentum-dependent effective magnetic field acting on the electron spin3, 4, 5, 6, 7, 8, 9. Here we report electron spin resonance due to a spin–orbit interaction that does not require external driving fields. The effect, which we term ballistic spin resonance, is driven by the free motion of electrons that bounce at frequencies of tens of gigahertz in micrometre-scale channels of a two-dimensional electron gas. This is a frequency range that is experimentally challenging to access in spin resonance, and especially difficult on a chip. The resonance is manifest in electrical measurements of pure spin currents10—we see a strong suppression of spin relaxation length when the oscillating spin–orbit field is in resonance with spin precession in a static magnetic field. These findings illustrate how the spin–orbit interaction can be harnessed for spin manipulation in a spintronic circuit11, and point the way to gate-tunable coherent spin rotations in ballistic nanostructures without external alternating current fields.