The 30 Doradus (30 Dor) nebula in the Large Magellanic Cloud (LMC) is the brightest HII region in the Local Group and a prototype starburst similar to those found in high redshift galaxies. It is thus a stepping stone to understand the complex formation processes of stars in starburst regions across the Universe. Here, we have studied the formation history of massive stars in 30 Dor using masses and ages derived for 452 mainly OB stars from the spectroscopic VLT-FLAMES Tarantula Survey (VFTS). We find that stars of all ages and masses are scattered throughout 30 Dor. This is remarkable because it implies that massive stars either moved large distances or formed independently over the whole field of view in relative isolation. We find that both channels contribute to the 30 Dor massive star population. Massive star formation rapidly accelerated about 8 Myr ago, first forming stars in the field before giving birth to the stellar populations in NGC 2060 and NGC 2070. The R136 star cluster in NGC 2070 formed last and, since then, about 1 Myr ago, star formation seems to be diminished with some continuing in the surroundings of R136. Massive stars within a projected distance of 8 pc of R136 are not coeval but show an age range of up to 6 Myr. Our mass distributions are well populated up to 200 M⊙. The inferred IMF is shallower than a Salpeter-like IMF and appears to be the same across 30 Dor. By comparing our sample of stars to stellar models in the Hertzsprung–Russell diagram, we find evidence for missing physics in the models above log L/L⊙ = 6 that is likely connected to enhanced wind mass loss for stars approaching the Eddington limit. Our work highlights the key information about the formation, evolution and final fates of massive stars encapsulated in the stellar content of 30 Dor, and sets a new benchmark for theories of massive star formation in giant molecular clouds.