Harvesting is often size‐selective, and in species with sexual size dimorphism, it may also be sex‐selective. A powerful approach to investigate potential consequences of size‐ and/or sex‐selective harvesting is to simulate it in a demographic population model. We developed a population‐based integral projection model for a size‐ and sex‐structured species, the commonly exploited pike (Esox lucius). The model allows reproductive success to be proportional to body size and potentially limited by both sexes. We ran all harvest simulations with both lower size limits and slot limits, and to quantify the effects of selective harvesting, we calculated sex ratios and the long‐term population growth rate (λ). In addition, we quantified to what degree purely size‐selective harvesting was sex‐selective, and determined when λ shifted from being female to male limited under size‐ and sex‐selective harvesting. We found that purely size‐selective harvest can be sex‐selective, and that it depends on the harvest limits and the size distributions of the sexes. For the size‐ and sex‐selective harvest simulations, λ increased with harvest intensity up to a threshold as females limited reproduction. Beyond this threshold, males became the limiting sex, and λ decreased as more males were harvested. The peak in λ, and the corresponding sex ratio in harvest, varied with both the selectivity and the intensity of the harvest simulation. Our model represents a useful extension of size‐structured population models as it includes both sexes, relaxes the assumption of female dominance, and accounts for size‐dependent fecundity. The consequences of selective harvesting presented here are especially relevant for size‐ and sex‐structured exploited species, such as commercial fisheries. Thus, our model provides a useful contribution toward the development of more sustainable harvesting regimes.