The mouse hepatitis virus (MHV) membrane (M) protein contains only O-linked oligosaccharides. We have used this protein as a model to study the structural requirements for O-glycosylation. We show that MHV M is modified by the addition of a single oligosaccharide side chain at the cluster of 4 hydroxylamino acids present at its extreme amino terminus and identified Thr at position 5 as the functional acceptor site. The hydroxylamino acid cluster, which is quite conserved among O-glycosylated coronavirus M proteins, is not in itself sufficient for O-glycosylation. Downstream amino acids are required to introduce a functional O-glycosylation site into a foreign protein. In a mutagenic analysis O-glycosylation was found to be sensitive to some particular changes but no unique sequence motif for O-glycosylation could be identified. Expression of mutant M proteins in cells revealed that substitution of any 1 residue was tolerated, conceivably due to the occurrence of multiple UDP-N-acetylgalactosamine:polypeptide N-acetylgalactosaminyltransferases (GalNAc transferases). Indeed, MHV M served as a substrate for GalNac-T1, -T2, and -T3, as was demonstrated using an in situ glycosylation assay based on the co-expression of endoplasmic reticulum-retained forms of the GalNAc transferases with endoplasmic reticulum-resident MHV M mutants. The GalNAc transferases were found to have largely overlapping, but distinct substrate specificities. The requirement for a threonine as acceptor rather than a serine residue and the requirement for a proline residue three positions downstream of the acceptor site were found to be distinctive features.