Biological control is a strategy to decrease parasitic populations, and the action takes place through natural antagonists in the environment. We studied the predatory activity of the fungus Duddingtonia flagrans in infective larvae (L3) of gastrointestinal nematodes after gastrointestinal transit. Ten heifers were divided into two groups: treated (animals received pellets containing fungus) and control (animals received pellets without fungus). Twelve hours after administration, faeces samples were collected for in vitro efficacy tests. The animals then remained for 7 h in the experimental pasture area. At the end of this period, 20 faecal pads (ten treated and ten control) were selected at random. Pasture, faecal pad and soil collections occurred with an interval of 7 days, totalling four assessments. In vitro activity demonstrated that fungi effectively preyed on L3, achieving a reduction percentage of 88%. In the faecal pad of the pasture area, there was a difference (P < 0.05) between collections 3 and 4 for both groups; in the treated group a reduction of 65% was obtained, while in the control group there was an increase of 217% in the number of L3. The recovery of L3 in the soil and in the pasture was similar in both groups. There was no influence (P = 0.87) of the passage time on the fungus predatory activity. Duddingtonia flagrans demonstrated the ability to survive gastrointestinal transit in the animals, reducing the number of L3 in the faeces, indicating that this biological control has great potential in the control of worm infections.