Parasitic nematodes of humans and livestock cause extensive disease and economic loss worldwide. Many parasitic nematodes infect hosts as third-stage larvae, called iL3s. iL3s vary in their infection route: some infect by skin penetration, others by passive ingestion. Skin-penetrating iL3s actively search for hosts using host-emitted olfactory cues, but the extent to which passively ingested iL3s respond to olfactory cues was largely unknown. Here, we examined the olfactory behaviors of the passively ingested murine gastrointestinal parasite Heligmosomoides polygyrus. H. polygyrus iL3s were thought to reside primarily on mouse feces, and infect when mice consume feces containing iL3s. However, iL3s can also adhere to mouse fur and infect orally during grooming. Here, we show that H. polygyrus iL3s are highly active and show robust attraction to host feces. Despite their attraction to feces, many iL3s migrate off feces to engage in environmental navigation. In addition, H. polygyrus iL3s are attracted to mammalian skin odorants, suggesting that they migrate toward hosts. The olfactory preferences of H. polygyrus are flexible: some odorants are repulsive for iL3s maintained on feces but attractive for iL3s maintained off feces. Experience-dependent modulation of olfactory behavior occurs over the course of days and is mediated by environmental carbon dioxide (CO2) levels. Similar experience-dependent olfactory plasticity occurs in the passively ingested ruminant-parasitic nematode Haemonchus contortus, a major veterinary parasite. Our results suggest that passively ingested iL3s migrate off their original fecal source and actively navigate toward hosts or new host fecal sources using olfactory cues. Olfactory plasticity may be a mechanism that enables iL3s to switch from dispersal behavior to host-seeking behavior. Together, our results demonstrate that passively ingested nematodes do not remain inactive waiting to be swallowed, but rather display complex sensory-driven behaviors to position themselves for host ingestion. Disrupting these behaviors may be a new avenue for preventing infections.