Legionella pneumophila (LP) avoids phagocytosis by secreting nearly 300 effector proteins into the host cytosol. SidE family of effectors (SdeA, SdeB, SdeC and SidE) employ phosphoribosyl serine ubiquitination to target an array of host Rab GTPases and innate immune factors. To suppress the deleterious toxicity of SidE enzymes in a timely manner, LP employs a metaeffector named SidJ. Upon activation by host Calmodulin (CaM), SidJ executes an ATP-dependent glutamylation to modify the catalytic residue Glu860 in the mono-ADP-ribosyl transferase (mART) domain of SdeA. SidJ is a unique glutamylase that adopts a kinase-like fold but contains two nucleotide-binding pockets. There is a lack of consensus about the substrate recognition and catalytic mechanism of SidJ. Here, we determined the cryo-EM structure of SidJ in complex with its substrate SdeA in two different states of catalysis. Our structures reveal that both phosphodiesterase (PDE) and mART domains of SdeA make extensive contacts with SidJ. In the pre-glutamylation state structure of the SidJ-SdeA complex, adenylylated E860 of SdeA is inserted into the non-canonical (migrated) nucleotide-binding pocket of SidJ. Structure-based mutational analysis indicates that SidJ employs its migrated pocket for the glutamylation of SdeA. Finally, using mass spectrometry, we identified several transient autoAMPylation sites close to both the catalytic pockets of SidJ. Our data provide unique insights into the substrate recognition and the mechanism of protein glutamylation by the pseudokinase SidJ.