The β-barrel assembly machinery (BAM) assists the folding and membrane insertion of bacterial outer membrane proteins. Here, the authors report structural characterization of BAM in lipid environment and in complex with the client protein EspP integrated into the barrel of BamA, providing insight into BAM mechanism of function.