The ability of pathogenic bacteria to recognize host glycans is often essential to their virulence. Here we report structure-function studies of previously uncharacterized glycogen-binding modules in the surface-anchored pullulanases from Streptococcus pneumoniae (SpuA) and Streptococcus pyogenes (PulA). Multivalent binding to glycogen leads to a strong interaction with alveolar type II cells in mouse lung tissue. X-ray crystal structures of the binding modules reveal a novel fusion of tandem modules into single, bivalent functional domains. In addition to indicating a structural basis for multivalent attachment, the structure of the SpuA modules in complex with carbohydrate provides insight into the molecular basis for glycogen specificity. This report provides the first evidence that intracellular lung glycogen may be a novel target of pathogenic streptococci and thus provides a rationale for the identification of the streptococcal alpha-glucan-metabolizing machinery as virulence factors.