Multicomponent efflux complexes constitute a primary mechanism for Gram-negative bacteria to expel toxic molecules for survival. As these complexes traverse the periplasm and link inner and outer membranes, it remains unclear how they operate efficiently without compromising periplasmic plasticity. Combining single-molecule superresolution imaging and genetic engineering, we study in living Escherichia coli cells the tripartite efflux complex CusCBA of the resistance-nodulation-division family that is essential for bacterial resistance to drugs and toxic metals. We find that CusCBA complexes are dynamic structures and shift toward the assembled form in response to metal stress. Unexpectedly, the periplasmic adaptor protein CusB is a key metal-sensing element that drives the assembly of the efflux complex ahead of the transcription activation of the cus operon for defending against metals. This adaptor protein-mediated dynamic pump assembly allows the bacterial cell for efficient efflux upon cellular demand while still maintaining periplasmic plasticity; this could be broadly relevant to other multicomponent efflux systems.