The life of a star is dominantly determined by the physical processes in the stellar interior. Unfortunately, we still have a poor understanding of how the stellar gas mixes near the stellar core, preventing precise predictions of stellar evolution 1 . The unknown nature of the mixing processes as well as the extent of the central mixed region is particularly problematic for massive stars 2 . Oscillations in stars with masses a few times that of the Sun offer a unique opportunity to disentangle the nature of various mixing processes, through the distinct signature they leave on period spacings in the gravity mode spectrum 3 . Here we report the detection of numerous gravity modes in a young star with a mass of about seven solar masses. The mean period spacing allows us to estimate the extent of the convective core, and the clear periodic deviation from the mean constrains the location of the chemical transition zone to be at about 10 per cent of the radius and rules out a clearcut profile.The young massive star HD 50230 is poorly studied, but it is known to have spectral type B3V and a visual magnitude of 8.95. HD 50230 is in its central nuclear-burning phase, just like the Sun, transforming hydrogen into helium in its core (the so-called main sequence phase). This important evolutionary phase covers about 90% of the life of the star, and the detailed internal structure of the star during this phase determines its ultimate fate 1,2 . This star is at the limiting mass of ending either as core-collapse supernova or as a white dwarf, enriching the interstellar medium with helium and heavy metals in the former case and carbon in the latter. A highquality continuous photometric light curve with 32-s sampling and with a span of 137 days has been obtained for the star by the Convection Rotation and Planetary Transits (CoRoT 4 ) satellite. A linear downward trend was removed from the data, after outliers were excluded from the light curve. The duty cycle of the final set of measurements analysed here is 88.6% and the noise has an amplitude of 1 mmag (Fig. 1). The light curve reveals the presence of numerous oscillation modes.Stellar oscillations have been found to occur at different stages of stellar life, for a range of stellar masses 5 . The best known case is that of the solar oscillations, which are acoustic modes with periods near 5 min (refs 6-9). The seismic interpretation of the detected solar oscillations led to a drastic improvement in the knowledge of the internal structure of the Sun 10,11 . Meanwhile, similar acoustic modes have been detected in various types of distant stars [12][13][14] . Gravity modes, on the other hand, probe much deeper layers inside stars and in principle allow the study of the core properties of stars far better than acoustic modes. Although such modes have been detected in massive stars similar to HD 50230 15,16 , where they have typical periods of half a day to a few days, their seismic potential could not be exploited because the number of detected modes in one star was far too lo...