Glycoproteins are abundant within the human reproductive system and alterations in glycosylation lead to reproductive disorders, suggesting that glycans play an important role in reproductive function. In this study, we used the Drosophila reproductive system as a model to investigate the biological functions of O-glycosylation. We found that O-glycosylation in the male accessory glands, an organ responsible for secreting seminal fluid proteins, plays important roles in female postmating behavior. The loss of one O-glycosyltransferase, PGANT9, in the male reproductive system resulted in decreased egg production in mated females. We identified one substrate of PGANT9, lectin-46Ca (CG1656), which is known to affect female postmating responses. We further show that the loss of lectin-46Ca O-glycosylation affects its ability to associate with sperm tails, resulting in reduced transfer within the female reproductive system. Our results provide the first example that O-glycosylation of a seminal fluid protein affects its ability to associate with sperm in vivo. These studies may shed light on the biological function of O-glycans in mammalian reproduction.