The unicellular parasite Trypanosoma brucei is transmitted between mammals by tsetse flies. Following the discovery that flagellar phosphodiesterase PDEB1 is required for trypanosomes to move in response to signals in vitro (social motility), we investigated its role in tsetse flies. Here we show that PDEB1 knockout parasites exhibit subtle changes in movement, reminiscent of bacterial chemotaxis mutants. Infecting flies with the knockout, followed by live confocal microscopy of fluorescent parasites within dual-labelled insect tissues, shows that PDEB1 is important for traversal of the peritrophic matrix, which separates the midgut lumen from the ectoperitrophic space. Without PDEB1, parasites are trapped in the lumen and cannot progress through the cycle. This demonstrates that the peritrophic matrix is a barrier that must be actively overcome and that the parasite's flagellar cAMP signaling pathway facilitates this. Migration may depend on perception of chemotactic cues, which could stem from co-infecting parasites and/or the insect host.