Auroral substorms, dynamic phenomena that occur in the upper atmosphere at night, are caused by global reconfiguration of the magnetosphere, which releases stored solar wind energy. These storms are characterized by auroral brightening from dusk to midnight, followed by violent motions of distinct auroral arcs that suddenly break up, and the subsequent emergence of diffuse, pulsating auroral patches at dawn. Pulsating aurorae, which are quasiperiodic, blinking patches of light tens to hundreds of kilometres across, appear at altitudes of about 100 kilometres in the high-latitude regions of both hemispheres, and multiple patches often cover the entire sky. This auroral pulsation, with periods of several to tens of seconds, is generated by the intermittent precipitation of energetic electrons (several to tens of kiloelectronvolts) arriving from the magnetosphere and colliding with the atoms and molecules of the upper atmosphere. A possible cause of this precipitation is the interaction between magnetospheric electrons and electromagnetic waves called whistler-mode chorus waves. However, no direct observational evidence of this interaction has been obtained so far. Here we report that energetic electrons are scattered by chorus waves, resulting in their precipitation. Our observations were made in March 2017 with a magnetospheric spacecraft equipped with a high-angular-resolution electron sensor and electromagnetic field instruments. The measured quasiperiodic precipitating electron flux was sufficiently intense to generate a pulsating aurora, which was indeed simultaneously observed by a ground auroral imager.