ABCG2 is a multidrug ATP-binding cassette transporter expressed in the plasma membranes of various tissues and tissue barrier [ 1– 4]. It translocates endogenous substrates, affects the pharmacokinetics of many drugs, and has a protective role against a wide array of xenobiotics, including anti-cancer drugs [ 5– 12]. Previous studies have revealed the architecture of ABCG2 and the structural basis of small-molecule and antibody inhibition [ 13, 14], but the mechanism of substrate recognition and ATP-driven transport are currently unknown. Here we present high-resolution cryo-EM structures of human ABCG2 in two key states, a substrate-bound pre-translocation state and an ATP-bound post-translocation state. For both structures, a mutant containing a glutamine replacing the catalytic glutamate (ABCG2 EQ) was used, which resulted in reduced ATPase and transport rates and facilitated conformational trapping for structural studies. In the substrate-bound state, a single molecule of estrone-3-sulphate (E 1S) is bound in a central, hydrophobic, and cytoplasm-facing cavity about halfway across the membrane. Only one molecule of E 1S can bind in the observed binding mode. In the ATP-boundstate, the substrate-binding cavity has completely collapsed while an external cavity has opened to the extracellular side of the membrane. The ATP-induced conformational changes include rigid-body shifts of the transmembrane domains (TMDs), pivoting of the nucleotide-binding domains (NBDs), and a change in the relative orientation of the NBD subdomains. Mutagenesis of residues contacting bound E 1S or in the translocation pathway, followed by in vitro characterization of transport and ATPase activities, demonstrated their roles in substrate recognition and revealed the importance of a leucine residue forming a ‘plug’ between the two cavities. Our results reveal how ABCG2 harnesses the energy of ATP binding to extrude E 1S and other substrates and suggest that the size and binding affinity of compounds are important parameters in distinguishing substrates from inhibitors.