We address the problem of the origin of massive stars, namely the origin, path and timescale of the mass flows that create them. Based on extensive numerical simulations, we propose a scenario where massive stars are assembled by large-scale, converging, inertial flows that naturally occur in supersonic turbulence. We refer to this scenario of massive-star formation as the Inertial-Inflow Model. This model stems directly from the idea that the mass distribution of stars is primarily the result of turbulent fragmentation. Under this hypothesis, the statistical properties of the turbulence determine the formation timescale and mass of prestellar cores, posing definite constraints on the formation mechanism of massive stars. We quantify such constraints by the analysis of a simulation of supernova-driven turbulence in a 250-pc region of the interstellar medium, describing the formation of hundreds of massive stars over a time of approximately 30 Myr. Due to the large size of our statistical sample, we can say with full confidence that massive stars in general do not form from the collapse of massive cores, nor from competitive accretion, as both models are incompatible with the numerical results. We also compute synthetic continuum observables in Herschel and ALMA bands. We find that, depending on the distance of the observed regions, estimates of core mass based on commonlyused methods may exceed the actual core masses by up to two orders of magnitude, and that there is essentially no correlation between estimated and real core masses.