The cyclic oligonucleotide-based anti-phage signalling system (CBASS) is a typeof innate prokaryotic immune system. Composed of a cyclic GMP-AMP synthase (cGAS) and CBASS-associated proteins, CBASS utilizes cyclic oligonucleotides to activate antiviral immunity. One major class of CBASS contains a homolog of eukaryotic ubiquitin-conjugating enzymes, which is either an E1-E2 fusion or a single E2. However, the functions of single E2s in CBASS remain elusive. Here, we report that a bacterial E2 enzyme regulates cGAS by imitating the ubiquitination cascade. This includes the processing of the cGAS C-terminus, conjugation of cGAS to a cysteine residue, ligation of cGAS to a lysine residue, cleavage of the isopeptide bond, and poly-cGASylation. The poly-cGASylation activates cGAS to produce cGAMP, which acts as an antiviral signal and leads to cell death. Thus, our findings reveal a unique regulatory role of E2 in CBASS.