Neisseria meningitidis PglL belongs to a novel family of bacterial oligosaccharyltransferases (OTases) responsible for O-glycosylation of type IV pilins. Although members of this family are widespread among pathogenic bacteria, there is little known about their mechanism. Understanding the O-glycosylation process may uncover potential targets for therapeutic intervention, and can open new avenues for the exploitation of these pathways for biotechnological purposes. In this work, we demonstrate that PglL is able to transfer virtually any glycan from the undecaprenyl pyrophosphate (UndPP) carrier to pilin in engineered Escherichia coli and Salmonella cells. Surprisingly, PglL was also able to interfere with the peptidoglycan biosynthetic machinery and transfer peptidoglycan subunits to pilin. This represents a previously unknown post-translational modification in bacteria. Given the wide range of glycans transferred by PglL, we reasoned that substrate specificity of PglL lies in the lipid carrier. To test this hypothesis we developed an in vitro glycosylation system that employed purified PglL, pilin, and the lipid farnesyl pyrophosphate (FarPP) carrying a pentasaccharide that had been synthesized by successive chemical and enzymatic steps. Although FarPP has different stereochemistry and a significantly shorter aliphatic chain than the natural lipid substrate, the pentasaccharide was still transferred to pilin in our system. We propose that the primary roles of the lipid carrier during O-glycosylation are the translocation of the glycan into the periplasm, and the positioning of the pyrophosphate linker and glycan adjacent to PglL. The unique characteristics of PglL make this enzyme a promising tool for glycoengineering novel glycan-based vaccines and therapeutics.