AB(5) toxins comprise an A subunit that corrupts essential eukaryotic cell functions, and pentameric B subunits that direct target-cell uptake after binding surface glycans. Subtilase cytotoxin (SubAB) is an AB(5) toxin secreted by Shiga toxigenic Escherichia coli (STEC), which causes serious gastrointestinal disease in humans. SubAB causes haemolytic uraemic syndrome-like pathology in mice through SubA-mediated cleavage of BiP/GRP78, an essential endoplasmic reticulum chaperone. Here we show that SubB has a strong preference for glycans terminating in the sialic acid N-glycolylneuraminic acid (Neu5Gc), a monosaccharide not synthesized in humans. Structures of SubB-Neu5Gc complexes revealed the basis for this specificity, and mutagenesis of key SubB residues abrogated in vitro glycan recognition, cell binding and cytotoxicity. SubAB specificity for Neu5Gc was confirmed using mouse tissues with a human-like deficiency of Neu5Gc and human cell lines fed with Neu5Gc. Despite lack of Neu5Gc biosynthesis in humans, assimilation of dietary Neu5Gc creates high-affinity receptors on human gut epithelia and kidney vasculature. This, and the lack of Neu5Gc-containing body fluid competitors in humans, confers susceptibility to the gastrointestinal and systemic toxicities of SubAB. Ironically, foods rich in Neu5Gc are the most common source of STEC contamination. Thus a bacterial toxin's receptor is generated by metabolic incorporation of an exogenous factor derived from food.