Chronic infection with hepatitis B virus (HBV), affecting more than 290 million people worldwide, is a major cause of cirrhosis and hepatocellular carcinoma and results in an estimated 820,000 human deaths annually1,2. Establishment of HBV infection requires a molecular interaction between the virus envelope glycoprotein L (LHBs) and the host entry receptor sodium-taurocholate co-transporting polypeptide (NTCP), a sodium-dependent bile acid transporter from blood to hepatocytes 3. However, the molecular basis for the virus-transporter interaction is poorly understood. Here, we report the cryo-electron microscopy (cryo-EM) structures of human, bovine, and rat NTCPs in the apo state, which reveals the presence of a tunnel across the membrane and a possible transport route for the substrate. Moreover, the cryo-EM structure of human NTCP in the presence of myristoylated preS1 domain of LHBs together with mutation and transport assays suggest a binding mode whereby preS1 and the substrate compete for the extracellular opening of the tunnel in NTCP. Importantly, the preS1 domain interaction analysis enables a mechanistic interpretation of naturally occurring HBV-insusceptible mutations in human NTCP. Taken together, our findings provide structural framework for HBV recognition and for mechanistic understanding of sodium-dependent bile acid translocation by mammalian NTCPs.