The spike protein N-terminal domains (NTDs) of bovine coronavirus (BCoV) and mouse hepatitis coronavirus (MHV) recognize sugar and protein receptors, respectively, despite their significant sequence homology. We recently determined the crystal structure of MHV NTD complexed with its protein receptor murine carcinoembryonic antigen-related cell adhesion molecule 1 (CEACAM1), which surprisingly revealed a human galectin (galactose-binding lectin) fold in MHV NTD. Here, we have determined at 1.55 Å resolution the crystal structure of BCoV NTD, which also has the human galectin fold. Using mutagenesis, we have located the sugar-binding site in BCoV NTD, which overlaps with the galactose-binding site in human galectins. Using a glycan array screen, we have identified 5-N-acetyl-9-O-acetylneuraminic acid as the preferred sugar substrate for BCoV NTD. Subtle structural differences between BCoV and MHV NTDs, primarily involving different conformations of receptor-binding loops, explain why BCoV NTD does not bind CEACAM1 and why MHV NTD does not bind sugar. These results suggest a successful viral evolution strategy in which coronaviruses stole a galectin from hosts, incorporated it into their spike protein, and evolved it into viral receptor-binding domains with altered sugar specificity in contemporary BCoV or novel protein specificity in contemporary MHV.