The tripartite complex AcrAB-TolC is the major efflux system in Escherichia coli. It extrudes a wide spectrum of noxious compounds out of the bacterium, including many antibiotics. Its active part, the homotrimeric transporter AcrB, is responsible for the selective binding of substrates and energy transduction. Based on available crystal structures and biochemical data, the transport of substrates by AcrB has been proposed to take place via a functional rotation, in which each monomer assumes a particular conformation. However, there is no molecular-level description of the conformational changes associated with the rotation and their connection to drug extrusion. To obtain insights thereon, we have performed extensive targeted molecular dynamics simulations mimicking the functional rotation of AcrB containing doxorubicin, one of the two substrates that were co-crystallized so far. The simulations, including almost half a million atoms, have been used to test several hypotheses concerning the structure-dynamics-function relationship of this transporter. Our results indicate that, upon induction of conformational changes, the substrate detaches from the binding pocket and approaches the gate to the central funnel. Furthermore, we provide strong evidence for the proposed peristaltic transport involving a zipper-like closure of the binding pocket, responsible for the displacement of the drug. A concerted opening of the channel between the binding pocket and the gate further favors the displacement of the drug. This microscopically well-funded information allows one to identify the role of specific amino acids during the transitions and to shed light on the functioning of AcrB.