The energy levels of hydrogen-like atomic systems can be calculated with great precision. Starting from their quantum mechanical solution, they have been refined over the years to include the electron spin, the relativistic and quantum field effects, and tiny energy shifts related to the complex structure of the nucleus. These energy shifts caused by the nuclear structure are vastly magnified in hydrogen-like systems formed by a negative muon and a nucleus, so spectroscopy of these muonic ions can be used to investigate the nuclear structure with high precision. Here we present the measurement of two 2S–2P transitions in the muonic helium-4 ion that yields a precise determination of the root-mean-square charge radius of the α particle of 1.67824(83) femtometres. This determination from atomic spectroscopy is in excellent agreement with the value from electron scattering1, but a factor of 4.8 more precise, providing a benchmark for few-nucleon theories, lattice quantum chromodynamics and electron scattering. This agreement also constrains several beyond-standard-model theories proposed to explain the proton-radius puzzle2–5, in line with recent determinations of the proton charge radius6–9, and establishes spectroscopy of light muonic atoms and ions as a precise tool for studies of nuclear properties.