The order of arrival of plant species during assembly can affect the structure and functioning of grassland communities. These so-called priority effects have been extensively studied aboveground, but we still do not know how they affect the vertical distribution of roots in the soil and the rooting depth of plant communities. To test this hypothesis, we manipulated the order of arrival of three plant functional groups (forbs, grasses and legumes) in a rhizobox experiment. Priority effects were created by sowing one functional group 10 days before the other two. Rhizoboxes in which all functional groups were sown simultaneously were used as controls. During the experiment, the mean rooting depth of plant communities was monitored using image analysis and a new methodological approach using deep learning (RootPainter) for root segmentation. At harvest, we measured aboveground (community and species level) and belowground (community level) biomass, and assessed the vertical distribution of the root biomass in different soil layers. At the community level, all scenarios where one functional group was sown before the other two had similar shoot and root productivity. At the species level, two forbs (Achillea millefolium and Centaurea jacea) benefited from arriving early, and one legume (Trifolium pratense) had a disadvantage when it was sown after the grasses. Priority effect treatments also affected the vertical distribution of roots. When grasses were sown first, plant communities rooted more shallowly than when forbs or legumes were sown first,. In addition, roots moved down the soil profile 24% more slowly in grasses-first communities. Our results highlight that plant functional group order of arrival in grassland communities can affect the vertical distribution of roots in the soil and this may have implications for species coexistence.