Plants release a wide set of secondary metabolites including volatile organic compounds (VOCs). Many of those compounds are considered to function as defense against herbivory, pests, and pathogens. However, little knowledge exists about the role of belowground plant VOCs for attracting beneficial soil microorganisms. We developed an olfactometer system to test the attraction of soil bacteria by VOCs emitted by Carex arenaria roots. Moreover, we tested whether infection of C. arenaria with the fungal pathogen Fusarium culmorum modifies the VOCs profile and bacterial attraction. The results revealed that migration of distant bacteria in soil towards roots can be stimulated by plant VOCs. Upon fungal infection, the blend of root VOCs changed and specific bacteria with antifungal properties were attracted. Tests with various pure VOCs indicated that those compounds can diffuse over long distance but with different diffusion abilities. Overall, this work highlights the importance of plant VOCs in belowground long-distance plant–microbe interactions.