Interactions between human lysozyme (HL) and the lipopolysaccharide (LPS) of Klebsiella pneumoniae O1, a causative agent of lung infection, were identified by surface plasmon resonance. To characterize the molecular mechanism of this interaction, HL binding to synthetic disaccharides and tetrasaccharides representing one and two repeating units, respectively, of the O-chain of this LPS were studied. pH-dependent structural rearrangements of HL after interaction with the disaccharide were observed through nuclear magnetic resonance. The crystal structure of the HL-tetrasaccharide complex revealed carbohydrate chain packing into the A, B, C, and D binding sites of HL, which primarily occurred through residue-specific, direct or water-mediated hydrogen bonds and hydrophobic contacts. Overall, these results support a crucial role of the Glu35/Asp53/Trp63/Asp102 residues in HL binding to the tetrasaccharide. These observations suggest an unknown glycan-guided mechanism that underlies recognition of the bacterial cell wall by lysozyme and may complement the HL immune defense function.