Intestinal parasitic worms are widespread throughout the world, causing chronic infections in humans and animals. However, very little is known about the locomotion of the worms in the host gut. We studied the movement of Heligmosomoides bakeri, naturally infecting mice, and used as an animal model for roundworm infections. We investigated the locomotion of H. bakeri in simplified environments mimicking key physical features of the intestinal lumen, i.e. medium viscosity and intestinal villi topology. We found that the motion sequence of these nematodes is non-periodic, but the migration could be described by transient anomalous diffusion. Aggregation as a result of biased, enhanced-diffusive locomotion of nematodes in sex-mixed groups was detected. This locomotion is probably stimulated by mating and reproduction, while single nematodes move randomly (diffusive). Natural physical obstacles such as high mucus-like viscosity or villi topology slowed down but did not entirely prevent nematode aggregation. Additionally, the mean displacement rate of nematodes in sex-mixed groups of 3.0 × 10-3 mm s-1 in a mucus-like medium is in good agreement with estimates of migration velocities of 10-4 to 10-3 mm s-1 in the gut. Our data indicate H. bakeri motion to be non-periodic and their migration random (diffusive-like), but triggerable by the presence of kin.