Mucin-type O-glycosylation is initiated by a family of polypeptide GalNAc-transferases (GalNAc-Ts) which are type-II transmembrane proteins that contain Golgi luminal catalytic and lectin domains that are connected by a flexible linker. Several GalNAc-Ts, including GalNAc-T4, show both long-range and short-range prior glycosylation specificity, governed by their lectin and catalytic domains, respectively. While the mechanism of the lectin-domain-dependent glycosylation is well-known, the molecular basis for the catalytic-domain-dependent glycosylation of glycopeptides is unclear. Herein, we report the crystal structure of GalNAc-T4 bound to the diglycopeptide GAT GAGAGAGT TPGPG (containing two α-GalNAc glycosylated Thr (T ), the PXP motif and a "naked" Thr acceptor site) that describes its catalytic domain glycopeptide GalNAc binding site. Kinetic studies of wild-type and GalNAc binding site mutant enzymes show the lectin domain GalNAc binding activity dominates over the catalytic domain GalNAc binding activity and that these activities can be independently eliminated. Surprisingly, a flexible loop protruding from the lectin domain was found essential for the optimal activity of the catalytic domain. This work provides the first structural basis for the short-range glycosylation preferences of a GalNAc-T.