Bacterial autotransporters comprise a C-terminal β-barrel domain, which must be correctly folded and inserted into the outer membrane to facilitate translocation of the N-terminal passenger domain to the cell exterior. Once at the surface, the passenger domains of most autotransporters are folded into an elongated β-helix. In a cellular context, key molecules catalyze the assembly of the autotransporter β-barrel domain. However, how the passenger domain folds into its functional form is poorly understood. Here we use mutational analysis on the autotransporter Pet to show that the β-hairpin structure of the fifth extracellular loop of the β-barrel domain has a crucial role for passenger domain folding into a β-helix. Bioinformatics and structural analyses, and mutagenesis of a homologous autotransporter, suggest that this function is conserved among autotransporter proteins with β-helical passenger domains. We propose that the autotransporter β-barrel domain is a folding vector that nucleates folding of the passenger domain.