Abstract In the animal kingdom, sexually dimorphic colour variation is a widespread phenomenon that significantly influences survival and reproductive success. However, the genetic underpinnings of this variation remain inadequately understood. Our investigation into sexually dimorphic colour variation in the desert-dwelling Guinan population (GN) of the toad-headed agamid lizard (Phrynocephalus putjatai) utilized a multidisciplinary approach, encompassing phenotypic, ultrastructural, biochemical, genomic analyses, and behavioral experiments. Our findings unveil the association between distinct skin colourations and varying levels of carotenoid and pteridine pigments. The red colouration in males is determined by a genomic region on chromosome 14, housing four pigmentation genes: BCO2 and three 6-Pyruvoyltetrahydropterin synthases (PTS). A GN-specific nonsynonymous SNP in BCO2 is predicted to alter the electrostatic potential within the binding domain of the BCO2-β-carotene complex, influencing their interaction. Additionally, the gene MAP7 on chromosome 2 emerges as a potential contributor to the blue colouration in subadults and adult females. Sex-specific expression patterns point to steroid hormone-associated genes (SULT2B1 and SRD5A2) as potential upstream regulators influencing sexually dimorphic colouration. Visual modeling and field experiments support the potential selective advantages of vibrant colouration in desert environments. This implies that natural selection, potentially coupled with assortative mating, might have played a role in fixing colour alleles, contributing to prevalence in the local desert habitat. This study provides novel insights into the genetic basis of carotenoid and pteridine-based colour variation, shedding light on the evolution of sexually dimorphic colouration in animals. Moreover, it advances our understanding of the driving forces behind such intricate colouration patterns.