The gut bacterial bile salt hydrolase (BSH) plays a critical role in host lipid metabolism and energy harvest. Therefore, BSH is a promising microbiome target to develop new therapies to regulate obesity in humans and novel non-antibiotic growth promoters for food animals. We previously reported the 1.90 Å apo crystal structure of BSH from Lactobacillus salivarius (lsBSH). In this study, we soaked the lsBSH crystal with glycocholic acid (GCA), a substrate, and obtained a 2.10 Å structure containing complex of lsBSH bound to GCA and cholic acid (CA), a product. The substrate/product sits in the water-exposed cavity molded by Loops 2 and 3. While the glycine moiety of GCA is exposed into a highly polar pocket, the sterane core of GCA is stabilized by aromatic and hydrophobic interactions. Comparison of product binding with BSH from Clostridium perfringenes reveals a distinct orientation of the sterane core in the binding site. The stability of the substrate-lsBSH complex and the putative catalytic mechanism were explored with molecular dynamics simulations. Site-directed mutagenesis of lsBSH demonstrated that Cys2 and Asn171 are critical for enzymatic activity, while Tyr24, Phe65 and Gln257 contribute to the substrate specificity. Together, this study provides structural insights into BSH-substrate interaction, the mechanism of catalysis and substrate specificity, which facilitate rational design of BSH inhibitors.