The envelope of Staphylococcus aureus is comprised of peptidoglycan and its attached secondary polymers, teichoic acid, capsular polysaccharide, and protein. Peptidoglycan synthesis involves polymerization of lipid II precursors into glycan strands that are cross-linked at wall peptides. It is not clear whether peptidoglycan structure is principally determined during polymerization or whether processive enzymes affect cell wall structure and function, for example, by generating conduits for protein secretion. We show here that S. aureus lacking SagB, a membrane-associated N-acetylglucosaminidase, displays growth and cell-morphological defects caused by the exaggerated length of peptidoglycan strands. SagB cleaves polymerized glycan strands to their physiological length and modulates antibiotic resistance in methicillin-resistant S. aureus (MRSA). Deletion of sagB perturbs protein trafficking into and across the envelope, conferring defects in cell wall anchoring and secretion, as well as aberrant excretion of cytoplasmic proteins.