Context. Different theories have been proposed to explain the formation of massive stars: two are based on accretion processes (monolithic core accretion and competitive accretion), and another on coalescence of low-and intermediate-mass stars. To distinguish between these theories, it is crucial to establish the distribution, the extinction, and the density of young low-mass stars in massive star-forming regions. X-ray observations can penetrate the very obscured cradles of massive stars, directly sampling the distribution of the population of pre-main sequence (PMS) low-mass stars in these regions. Aims. Our aim is to analyze deep X-ray observations of the Orion massive star-forming region using the Chandra Orion Ultradeep Project (COUP) catalog, to reveal the distribution of the population and clustering of PMS low-mass stars, and to study their possible role in massive star formation. Methods. We studied the distribution of PMS low-mass stars with X-ray emission in Orion as a function of extinction with two different methods: a spatial gridding and a close-neigbors method with cells of ∼0.03 × 0.03 pc 2 , the typical size of protostellar cores. We derived density maps of the stellar population and calculated cluster stellar densities. Results. Consistent with previous studies, we found that PMS low-mass stars cluster toward the three massive star-forming regions: the Trapezium cluster (TC), the Orion hot core (OHC), and the OMC1-S region. We derived PMS low-mass stellar densities of 10 5 stars pc −3 in the TC and OMC1-S, and of 10 6 stars pc −3 in the OHC. The close association between the low-mass star clusters with massive star cradles supports the role of these clusters in the formation of massive stars. The X-ray observations show for the first time in the TC that low-mass stars with intermediate extinction are clustered toward the position of the most massive star θ 1 Ori C, which is surrounded by a ring of non-extincted PMS low-mass stars. This "envelope-core" structure is also supported by infrared and optical observations. Our analysis suggests that at least two basic ingredients are needed in massive star formation: the presence of dense gas and a cluster of low-mass stars. The scenario that better explains our findings assumes high fragmentation in the parental core, accretion at subcore scales that forms a low-mass stellar cluster, and subsequent competitive accretion. Finally, although coalescence does not seem a common mechanism for building up massive stars, we show that a single stellar merger may have occurred in the evolution of the OHC cluster, favored by the presence of disks, binaries, and gas accretion.