Sertraline and fluoxetine are selective serotonin reuptake inhibitors (SSRIs) widely-prescribed to treat depression. They exert their effects by inhibiting the presynaptic plasma membrane serotonin transporter (SERT). All SSRIs possess at specific positions halogen atoms, which are key determinants for the drugs’ specificity for SERT. For the SERT protein, however, the structural basis of its specificity for SSRIs is poorly understood. Here we report the crystal structures of LeuT, a bacterial SERT homolog, in complex with sertraline, R-fluoxetine or S-fluoxetine. The SSRI halogens all bind to exactly the same pocket within LeuT. Mutation at this halogen-binding pocket (HBP) in SERT dramatically reduces the transporter's affinity for SSRIs but not for tricyclic antidepressants. Conversely, when the only non-conserved HBP residue in both norepinephrine and dopamine transporters is mutated into that found in SERT, their affinities for all the three SSRIs increase uniformly. Thus, the specificity of SERT for SSRIs is dependent largely on interaction of the drug halogens with the protein's halogen-binding pocket.