Sexual dimorphism in immunocompetence, with males having lower immune function, is a prevalent pattern in nature. The main evolutionary explanation for this pattern is that males preferentially allocate resources away from immune function and towards reproductive effort to increase their competitiveness for limited females. However, the role of differential predation risk between the sexes has not been considered, despite predation risk being a major driver of life history strategies and male sexual traits often having associated predation costs. It is unclear whether increased predation risk should increase or decrease investment in immune function, as males have been shown to utilize both behavioural (e.g. decrease foraging activity) and/or life-history (e.g. decrease investment in sexual trait) defense strategies to manage predation risk. Here, we modelled optimal resource acquisition and allocation towards immune function under differential predation risk with multiple defense strategies. If males have limited defense strategies, increasing predation risk caused males to trade-off immune function for reproductive effort, leading to reduced immunocompetence. In contrast, if males can only decrease predation risk through reduction of reproductive effort (e.g. decrease colouration or calling rates), then increasing predation risk causes immune function to increase. If males can utilize multiple defense strategies and sexual selection is low, then males maintain a constant immune function as predation risk increases. Sexual selection robustly resulted in decreased immunocompetence. Overall, our results suggest that predation plays an important role in the evolution of sexual dimorphism in immunocompetence, but predicting its effect requires understanding the integrated defense strategies available.