The folding and insertion of β-barrel proteins into the mitochondrial outer membrane is facilitated by the sorting and assembly machinery (SAM) complex. Here we report two 2.8 Å cryo-EM structures of the Thermothelomyces thermophilus SAM complex in the absence of substrate in which the Sam50 lateral gate adopts two different conformations: the first is a closed lateral gate as observed in previously published structures, while the second contains a Sam50 with the first four β-strands rotated outwards by approximately 45°, resulting in an open lateral gate. The observed monomeric open conformation contrasts our previous work where the open conformation was adopted by non-physiological up-down dimers. To understand how these lateral gate dynamics are influenced by substrate, we studied the interaction of the SAM complex with a β-signal peptide mimic, darobactin A. Darobactin A binds to the SAM complex with nanomolar affinity and inhibits the import and assembly of mitochondrial β-barrel proteins in vitro. Lastly, we solved a 3.0 Å cryo-EM structure of the Thermothelomyces thermophilus SAM complex bound to darobactin A, which reveals that darobactin A stabilizes the Sam50 lateral gate similar to the open conformation by binding to strand β1, therefore blocking β-barrel biogenesis.