Bifidobacterium bifidum lacto-N-biosidase (LnbB) is a critical enzyme for the degradation of human milk oligosaccharides in the gut microbiota of breast-fed infants. Guided by recent crystal structures, we unveil its molecular mechanism of catalysis using QM/MM metadynamics. We show that the oligosaccharide substrate follows 1S3/1,4B → [4E]‡→ 4C1/4H5and 4C1/4H5→ [4E/4H5]‡→ 1,4B conformational itineraries for the two successive reaction steps, with reaction free energy barriers in agreement with experiments. The simulations also identify a critical histidine (His263) that switches between two orientations to modulate the pKaof the acid/base residue, facilitating catalysis. The reaction intermediate of LnbB is best depicted as an oxazolinium ion, with a minor population of neutral oxazoline. The present study sheds light on the processing of oligosaccharides of the early life microbiota and will be useful for the engineering of LnbB and similar glycosidases for biocatalysis.