The mountain pine beetle (Dendroctonus ponderosae) is an insect native to western North America; however, its geographical range has recently expanded north in BC and east into Alberta. To understand the population structure in the areas of expansion, 16 gene‐linked microsatellites were screened and compared to neutral microsatellites using outlier analyses of F
st and F
ct values. One sex‐linked gene, inhibitor of apoptosis (IAP), showed a strong signature of positive selection for neo‐X alleles and was analyzed for evidence of adaptive variation. Alleles of IAP were sequenced, and differences between the neo‐X and neo‐Y alleles were consistent with neutral evolution suggesting that the neo‐Y allele may not be under functional constraints. Neo‐Y alleles were amplified from gDNA, but not effectively from cDNA, suggesting that there was little IAP expression from neo‐Y alleles. There were no differences in overall IAP expression between males and females with the common northern neo‐X allele suggesting that the neo‐X allele in males compensates for the reduced expression of neo‐Y alleles. However, males lacking the most common northern neo‐X allele thought to be selected for in northern populations had reduced overall IAP expression in early October—at a time when beetles are preparing for overwintering. This suggests that the most common allele may have more rapid upregulation. The reduced function of neo‐Y alleles of IAP suggested by both sequence differences and lower levels of expression may foster a highly selective environment for neo‐X alleles such as the common northern allele with more efficient upregulation.