The density-dependent prophylaxis hypothesis posits that because pathogens are expected to be transmitted among conspecifics in crowded conditions, individuals living in such conditions should minimize their chance of infection and maximize survival by elevating their baseline immunity. Further, if individuals developing in crowded conditions indeed allocate more resources to immunity then resource allocation to other life-history traits, such as reproduction, should decline. We tested these hypotheses by rearing sand crickets (Gryllus firmus) at either low or high density in the laboratory and quantified immune function (melanotic encapsulation response) and reproductive investment (ovary mass, egg size) at adulthood. The results did not support the density-dependent prophylaxis hypothesis, but we did find that rearing density significantly affected investment in two reproductive traits, with average ovary mass and egg size both being larger in low-density crickets. We discuss possible explanations for the lack of a trade-off between immunity and reproduction in our study.