Because of divergent selection acting on males and females arising from different life-history strategies, polyandry can be expected to promote sexual dimorphism of investment into immune function. In previous work we have established the existence of such divergence within populations where males and females are exposed to varying degrees of polyandry. We here test whether the removal of sexual selection via enforced monogamy generates males and females that have similar levels of investment in immune function. To test this prediction experimentally, we measured differences between the sexes in a key immune measurement (phenoloxidase (PO) activity) and resistance to the microsporidian Paranosema whitei in Tribolium castaneum lines that evolved under monogamous (sexual selection absent) vs polyandrous (sexual selection present) mating systems. At generation 49, all selected lines were simultaneously assessed for PO activity and resistance to their natural parasite P. whitei after two generations of relaxed selection. We found that the polyandrous regime was associated with a clear dimorphism in immune function: females had significantly higher PO activities than males in these lines. In contrast, there was no such difference between the sexes in the lines evolving under the monogamous regime. Survival in the infection experiment did not differ between mating systems or sexes. Removing sexual selection via enforced monogamy thus seems to erase intersexual differences in immunity investment. We suggest that higher PO activities in females that have evolved under sexual selection might be driven by the increased risk of infections and/or injuries associated with exposure to multiple males.