Protein glycosylation is a widespread post-translational modification. The first committed step to the lipid-linked glycan used for this process is catalysed by dolichyl-phosphate N-acetylglucosamine-phosphotransferase DPAGT1 (GPT/E.C. 220.127.116.11). Missense DPAGT1 variants cause congenital myasthenic syndrome and congenital disorders of glycosylation. In addition, naturally-occurring bactericidal nucleoside analogues such as tunicamycin are toxic to eukaryotes due to DPAGT1 inhibition, preventing their clinical use as antibiotics. However, little is known about the mechanism or the effects of disease-associated mutations in this essential enzyme. Our structures of DPAGT1 with the substrate UDP-GlcNAc and tunicamycin reveal substrate binding modes, suggest a mechanism of catalysis, provide an understanding of how mutations modulate activity (and thus cause disease) and allow design of non-toxic lipid-altered tunicamycins. The structure-tuned activity of these analogues against several bacterial targets allowed design of potent antibiotics for Mycobacterium tuberculosis, enabling treatment in vitro, in cellulo and in vivo thereby providing a promising new class of antimicrobial drug.