Glutamine is the primary metabolite of nitrogen assimilation from inorganic nitrogen sources in microorganisms and plants. The ability to monitor cellular nitrogen status is pivotal for maintaining metabolic homeostasis and sustaining growth. The present study identifies a glutamine-sensing mechanism common in the entire plant kingdom except Brassicaceae. The plastid-localized PII signaling protein controls, in a glutamine-dependent manner, the key enzyme of the ornithine synthesis pathway, N-acetyl-l-glutamate kinase (NAGK), that leads to arginine and polyamine formation. Crystal structures reveal that the plant-specific C-terminal extension of PII, which we term the Q loop, forms a low-affinity glutamine-binding site. Glutamine binding alters PII conformation, promoting interaction and activation of NAGK. The binding motif is highly conserved in plants except Brassicaceae. A functional Q loop restores glutamine sensing in a recombinant Arabidopsis thaliana PII protein, demonstrating the modular concept of the glutamine-sensing mechanism adopted by PII proteins during the evolution of plant chloroplasts.