Theoretic and empirical studies show that social surroundings experienced by male insects during their larval or adult stage can influence their testicular investment in diverse ways. Although insect pupae do not feed and crawl, they can communicate using sex-specific and/or non-sex specific cues. Yet, it is unknown, in any insect, whether and how male pupae can fine-tune their resource allocation to sperm production and testis size in response to socio-sexual environments. We investigated this question using a moth, Ephestia kuehniella, which produces fertile eupyrene sperm and unfertile apyrene sperm. We held male pupae individually or in groups with different sex ratios, and dissected adults upon eclosion, measured their testis size, and counted both types of sperm. We demonstrated that after exposure to conspecific pupal cues regardless of sex, male pupae increased production of eupyrenes and apyrenes at the same rate but kept testis size unchanged. We suggest that testis size is fixed after pupation because most morphological traits are formed during the larval stage, allowing little room for pupae to adjust testis size. Like adults, male pupae with fully grown testes have sufficient resources to produce more sperm of both types according to the perceived increase in sperm competition risk.