Although genotype-by-environment interaction has long been used to unveil the genetic variation that affects Darwinian fitness, the mechanisms underlying the interaction usually remain unknown. Genetic variation at the dimeric glycolytic enzyme phosphoglucoisomerase (Pgi) has been observed to interact with temperature to explain the variation in the individual performance of the butterfly Melitaea cinxia. At relatively high temperature, individuals with Pgi-non-f genotypes generally surpass those with Pgi-f genotypes, while the opposite applies at relatively low temperature. In this study, we did protein structure predictions and BlastP homology searches with the aim to understand the structural basis for this temperature-dependent difference in the performance of M. cinxia. Our results show that, at amino acid (AA) site 372, one of the two sites that distinguish Pgi-f (the translated polypeptide of the Pgi-f allele) from Pgi-non-f (the translated polypeptide of the Pgi-non-f allele), the Pgi-non-f-related residue strengthens an electrostatic attraction between a pair of residues (Glu373-Lys472) that are from different monomers, compared to the Pgi-f-related residue. Further, BlastP searches of animal protein sequences reveal a dramatic excess of electrostatically attractive combinations of the residues at the Pgi AA sites equivalent to sites 373 and 472 in M. cinxia. This suggests that factors enhancing the inter-monomer interaction between these two sites, and therefore helping the tight association of two Pgi monomers, are favourable. Our homology-modelling results also show that, at the second AA site that distinguishes Pgi-f from Pgi-non-f in M. cinxia, the Pgi-non-f-related residue is more entropy-favourable (leading to higher structural stability) than the Pgi-f-related residue. To sum up, this study suggests a higher structural stability of the protein products of the Pgi-non-f genotypes than those of the Pgi-f genotypes, which may explain why individuals carrying Pgi-non-f genotypes outperform those carrying Pgi-f genotypes at stressful high temerature.