Paired immunoglobulin-like type 2 receptor alpha (PILRalpha) is an inhibitory receptor expressed on both hematopoietic and nonhematopoietic cells. Its binding to a cellular ligand, CD99, depends on the presence of sialylated O-linked glycans on CD99. Glycoprotein B (gB) of herpes simplex virus type 1 (HSV-1) binds to PILRalpha, and this association is involved in HSV-1 infection. Here, we found that the presence of sialylated O-glycans on gB is required for gB to associate with PILRalpha. Furthermore, we identified two threonine residues on gB that are essential for the addition of the principal O-glycans acquired by gB and that are also essential for the binding of PILRalpha to gB.