The respiratory glycoprotein hemocyanin has been implicated in immune‐related functions. Using lectin blotting, we show that the binding of shrimp (Litopenaeus vannamei) hemocyanin to concanavalin A decreases markedly with O‐glycosidase treatment but not with PNGase F. Twelve O‐glycosylation sites, three on the large hemocyanin subunit and nine on the small hemocyanin subunit (HMCs), were identified by LC‐MS/MS. Importantly, when the glycosylation sites at Thr‐537, Ser‐539, and Thr‐542 on the C terminus of HMCs were replaced with alanine, the resultant mutant hemocyanin had reduced carbohydrate content, coupled with a fourfold reduction in bacterial agglutination and 0.2‐fold reduction in antibacterial activities toward Vibrio parahaemolyticus and Staphylococcus aureus. These results suggest that the glycosylation sites on shrimp hemocyanin are closely related to its immunological functions.