The proton is the primary building block of the visible Universe, but many of its properties—such as its charge radius and its anomalous magnetic moment—are not well understood. The root-mean-square charge radius, rp, has been determined with an accuracy of 2 per cent (at best) by electron–proton scattering experiments1, 2. The present most accurate value of rp (with an uncertainty of 1 per cent) is given by the CODATA compilation of physical constants3. This value is based mainly on precision spectroscopy of atomic hydrogen4, 5, 6, 7 and calculations of bound-state quantum electrodynamics (QED; refs 8, 9). The accuracy of rp as deduced from electron–proton scattering limits the testing of bound-state QED in atomic hydrogen as well as the determination of the Rydberg constant (currently the most accurately measured fundamental physical constant3). An attractive means to improve the accuracy in the measurement of rp is provided by muonic hydrogen (a proton orbited by a negative muon); its much smaller Bohr radius compared to ordinary atomic hydrogen causes enhancement of effects related to the finite size of the proton. In particular, the Lamb shift10 (the energy difference between the 2S1/2 and 2P1/2 states) is affected by as much as 2 per cent. Here we use pulsed laser spectroscopy to measure a muonic Lamb shift of 49,881.88(76) GHz. On the basis of present calculations11, 12, 13, 14, 15 of fine and hyperfine splittings and QED terms, we find rp = 0.84184(67) fm, which differs by 5.0 standard deviations from the CODATA value3 of 0.8768(69) fm. Our result implies that either the Rydberg constant has to be shifted by −110 kHz/c (4.9 standard deviations), or the calculations of the QED effects in atomic hydrogen or muonic hydrogen atoms are insufficient.