The strength of selection on immune function in wild populations has only been examined in a few vertebrate species. We report the results from a study measuring selection on a key insect immune enzyme, phenoloxidase (PO), in a wild population of the damselfly Calopteryx xanthostoma. We followed individually marked males from the pre-reproductive adult phase and recorded their lifetime mating success. We found positive selection on PO activity in response to an immune insult, but no selection on wing-spot quality, a trait actively displayed to females during courtship. We suggest that positive selection on PO activity in the year of study may be explained by annual fluctuations in parasite loads.