β-barrel outer membrane proteins (OMPs) are found within the outer membranes (OM) of Gram-negative bacteria and are essential for nutrient import, signaling, and adhesion. While the exact mechanism is unknown, a 200 kDa five component complex called the β-barrel assembly machinery (BAM) complex has been implicated in the biogenesis of OMPs. Here, we report the structure of the BAM complex from E. coli, revealing that binding of the accessory proteins BamCDE modulates the conformation of BamA, the central component of the complex, which may regulate the function of the BAM complex. The periplasmic domain of BamA was found in a closed state that prevents access to the barrel lumen from the periplasm, indicating substrate OMPs likely do not enter the barrel during biogenesis. Further, the first eight strands of the β-barrel domain undergo an unprecedented conformational shift leading to opening of the exit pore and rearrangement at the lateral gate.