The exopolysaccharide (EPS) produced by Pantoea alhagi NX-11, referred to as alhagan, enhances plant stress resistance, improves soil properties, and exhibits notable rheological properties. Despite these benefits, the exact bio-synthetic process of alhagan by P. alhagi NX-11 remains unclear. This study focused on sequencing the complete genome of P. alhagi NX-11 and identifying an alhagan synthesis gene cluster (LQ939_RS12550 to LQ939_RS12700). Gene annotation revealed that alhagan biosynthesis in P. alhagi NX-11 follows the Wzx/Wzy-dependent pathway. Furthermore, transcriptome analysis of P. alhagi NX-11 highlighted significant upregulation of four glycosyltransferase genes (alhH, wcaJ, alhK, and alhM) within the alhagan synthesis gene cluster. These glycosyltransferases are crucial for alhagan synthesis. To delve deeper into this process, two upregulated and uncharacterized glycosyltransferase genes, alhH and alhK, were knocked out. The resulting mutants, ΔalhH and ΔalhK, showed a notable decrease in EPS yield, reduced molecular weight, and altered monosaccharide compositions. These findings contribute to a better understanding of the alhagan biosynthesis mechanism in P. alhagi NX-11.