Mycobacterium tuberculosis is the cause of one of the most important infectious diseases in humans, which leads to 1.4 million deaths every year1. Specialized protein transport systems—known as type VII secretion systems (T7SSs)—are central to the virulence of this pathogen, and are also crucial for nutrient and metabolite transport across the mycobacterial cell envelope2,3. Here we present the structure of an intact T7SS inner-membrane complex of M. tuberculosis. We show how the 2.32-MDa ESX-5 assembly, which contains 165 transmembrane helices, is restructured and stabilized as a trimer of dimers by the MycP5 protease. A trimer of MycP5 caps a central periplasmic dome-like chamber that is formed by three EccB5 dimers, with the proteolytic sites of MycP5 facing towards the cavity. This chamber suggests a central secretion and processing conduit. Complexes without MycP5 show disruption of the EccB5 periplasmic assembly and increased flexibility, which highlights the importance of MycP5 for complex integrity. Beneath the EccB5–MycP5 chamber, dimers of the EccC5 ATPase assemble into three bundles of four transmembrane helices each, which together seal the potential central secretion channel. Individual cytoplasmic EccC5 domains adopt two distinctive conformations that probably reflect different secretion states. Our work suggests a previously undescribed mechanism of protein transport and provides a structural scaffold to aid in the development of drugs against this major human pathogen.