Parasites that primarily infect white-tailed deer (Odocoileus virginianus), such as liver flukes (Fascioloides magna) and meningeal worm (Parelaphostrongylus tenuis), can cause morbidity and mortality when incidentally infecting moose (Alces alces). Ecological factors are expected to influence spatial variation in infection risk by affecting the survival of free-living life stages outside the host and the abundance of intermediate gastropod hosts. Here, we investigate how ecology influenced the fine-scale distribution of these parasites in deer in Voyageurs National Park, Minnesota. Deer pellet groups (N = 295) were sampled for the presence of P. tenuis larvae and F. magna eggs. We found that deer were significantly more likely to be infected with P. tenuis in habitats with less upland deciduous forest and more upland mixed conifer forest and shrub, a pattern that mirrored microhabitat differences in gastropod abundances. Deer were also more likely to be infected with F. magna in areas with more marshland, specifically rooted-floating aquatic marshes (RFAMs). The environment played a larger role than deer density in determining spatial patterns of infection for both parasites, highlighting the importance of considering ecological factors on all stages of a parasite's life cycle in order to understand its occurrence within the definitive host.