Ecological changes are recognized as an important driver behind the emergence of infectious diseases. The prevalence of infection in ticks depends upon ecological factors that are rarely taken into account simultaneously. Our objective was to investigate the influences of forest fragmentation, vegetation, adult tick hosts, and habitat on the infection prevalence of three tick-borne bacteria, Borrelia burgdorferi sensu lato, Anaplasma phagocytophilum, and Rickettsia sp. of the spotted fever group, in questing Ixodes ricinus ticks, taking into account tick characteristics. Samples of questing nymphs and adults were taken from 61 pastures and neighboring woodlands in central France. The ticks were tested by PCR of pools of nymphs and individual adults. The individual infection prevalence was modeled using multivariate regression. The highest infection prevalences were found in adult females collected in woodland sites for B. burgdorferi sensu lato and A. phagocytophilum (16.1% and 10.7%, respectively) and in pasture sites for Rickettsia sp. (8.7%). The infection prevalence in nymphs was lower than 6%. B. burgdorferi sensu lato was more prevalent in woodlands than in pastures. Forest fragmentation favored B. burgdorferi sensu lato and A. phagocytophilum prevalence in woodlands, and in pastures, the B. burgdorferi sensu lato prevalence was favored by shrubby vegetation. Both results are probably because large amounts of edges or shrubs increase the abundance of small vertebrates as reservoir hosts. The Rickettsia sp. prevalence was maximal on pasture with medium forest fragmentation. Female ticks were more infected by B. burgdorferi sensu lato than males and nymphs in woodland sites, which suggests an interaction between the ticks and the bacteria. This study confirms the complexity of the tick-borne pathogen ecology. The findings support the importance of small vertebrates as reservoir hosts and make a case for further studies in Europe on the link between the composition of the reservoir host community and the infection prevalence in ticks.