Hot Jupiters are giant Jupiter-like exoplanets that orbit their host stars 100 times more closely than Jupiter orbits the Sun. These planets presumably form in the outer part of the primordial disk from which both the central star and surrounding planets are born, then migrate inwards and yet avoid falling into their host star. It is, however, unclear whether this occurs early in the lives of hot Jupiters, when they are still embedded within protoplanetary disks, or later, once multiple planets are formed and interact. Although numerous hot Jupiters have been detected around mature Sun-like stars, their existence has not yet been firmly demonstrated for young stars, whose magnetic activity is so intense that it overshadows the radial velocity signal that close-in giant planets can induce. Here we report that the radial velocities of the young star V830 Tau exhibit a sine wave of period 4.93 days and semi-amplitude 75 metres per second, detected with a false-alarm probability of less than 0.03 per cent, after filtering out the magnetic activity plaguing the spectra. We find that this signal is unrelated to the 2.741-day rotation period of V830 Tau and we attribute it to the presence of a planet of mass 0.77 times that of Jupiter, orbiting at a distance of 0.057 astronomical units from the host star. Our result demonstrates that hot Jupiters can migrate inwards in less than two million years, probably as a result of planet–disk interactions.