Knowledge of the mechanisms by which bacterial pili adhere to host cells and withstand external forces is critical to our understanding of their functional roles and offers exciting avenues in biomedicine for controlling the adhesion of bacterial pathogens and probiotics. While much progress has been made in the nanoscale characterization of pili from Gram-negative bacteria, the adhesive and mechanical properties of Gram-positive bacterial pili remain largely unknown. Here, we use single-molecule atomic force microscopy to unravel the binding mechanism of pili from the probiotic Gram-positive bacterium Lactobacillus rhamnosus GG (LGG). First, we show that SpaC, the key adhesion protein of the LGG pilus, is a multifunctional adhesin with broad specificity. SpaC forms homophilic trans-interactions engaged in bacterial aggregation and specifically binds mucin and collagen, two major extracellular components of host epithelial layers. Homophilic and heterophilic interactions display similar binding strengths and dissociation rates. Next, pulling experiments on living bacteria demonstrate that LGG pili exhibit two unique mechanical responses, that is, zipper-like adhesion involving multiple SpaC molecules distributed along the pilus length and nanospring properties enabling pili to resist high force. These mechanical properties may represent a generic mechanism among Gram-positive bacterial pili for strengthening adhesion and withstanding shear stresses in the natural environment. The single-molecule experiments presented here may help us to design molecules capable of promoting or inhibiting bacterial-host interactions.