Glutamine synthetase is one of the predominant enzymes in nitrogen metabolism. In developing leaves, glutamine is mainly produced in chloroplasts by the activity of the GS2 isoenzyme. It catalyzes glutamine synthesis from glutamate and ammonia in an ATP-dependent reaction. The genes encoding glutamine synthetase play a crucial role in ammonia and glutamate detoxification, acid-base homeostasis, cell signaling, and cell proliferation. The gene family responsible for producing glutamine synthetase has been previously documented in model plants like Arabidopsis. Nevertheless, there has been no exploration into its existence and attributes in oilseed crops like sunflower (Helianthus annuus L.). This study thoroughly analyzes, gene structure, conserved motifs, chromosomal location, phylogenetic relationships, and expression patterns to identify the glutamine synthetase genes in H. annuus. Our findings unveiled 19 genes encoding glutamine synthetase within the H. annuus genome. These genes were distributed across 11 chromosomes of H. annuus. Furthermore, we examined the expression patterns of all the HaGS genes using RNA-seq datasets, specifically focusing on their response to biotic and abiotic stress conditions. Under biotic stress, H. annuus expresses genes for mycorrhizal fungi named Rhizoglomus irregulare at four days post inflorescence (dpi) and 16 dpi. Under abiotic stress, the effect of drought and hormones was investigated. In drought, one gene, HaGS6D, showed the highest expression in the leaf. Meanwhile, in roots, gene HaGS7B showed the highest expression. Under hormonal stress, the effects of auxin, brassinosteroid, and cytokinin were studied on the leaf. For auxin, the gene HaGS7C showed the highest expression. For brassinosteroid, the gene HaGS7D showed the highest expression; for cytokinin, the gene HaGS6E showed the highest expression. Thus, these findings can significantly contribute to our understanding of the arrangement of glutamine synthetase genes in H. annuus and offer valuable insights for developing of drought-resistant cultivars of this species.