Oligopeptidase B cleaves after basic amino acids in peptides up to 30 residues. As a virulence factor in bacteria and trypanosomatid pathogens that is absent in higher eukaryotes, this is a promising drug target. Here we present ligand-free open state and inhibitor-bound closed state crystal structures of oligopeptidase B from Trypanosoma brucei, the causative agent of African sleeping sickness. These (and related) structures show the importance of structural dynamics, governed by a fine enthalpic and entropic balance, in substrate size selectivity and catalysis. Peptides over 30 residues cannot fit the enzyme cavity, preventing the complete domain closure required for a key propeller Asp/Glu to fix the catalytic His and Arg in the catalytically competent conformation. This size exclusion mechanism protects larger peptides and proteins from degradation. Similar bacterial prolyl endopeptidase and archael acylaminoacyl peptidase structures demonstrate this mechanism is conserved among oligopeptidase family enzymes across all three domains of life.