Temperature and crowding are key environmental factors mediating the transmission and epizooty of infectious disease in ectotherm animals. The host physiology may be altered in a temperature‐dependent manner and thus affects the pathogen development and course of diseases within an individual and host population, or the transmission rates (or infectivity) of pathogens shift linearly with the host population density. To our understanding, the knowledge of interactive and synergistic effects of temperature and population density on the host–pathogen system is limited. Here, we tested the interactional effects of these environmental factors on phenotypic plasticity, immune defenses, and disease resistance in the velvetbean caterpillar Anticarsia gemmatalis. Upon egg hatching, caterpillars were reared in thermostat‐controlled chambers in a 2 × 4 factorial design: density (1 or 8 caterpillars/pot) and temperature (20, 24, 28, or 32°C). Of the immune defenses assessed, encapsulation response was directly affected by none of the environmental factors; capsule melanization increased with temperature in both lone‐ and group‐reared caterpillars, although the lone‐reared ones presented the most evident response, and hemocyte numbers decreased with temperature regardless of the population density. Temperature, but not population density, affected considerably the time from inoculation to death of velvetbean caterpillar. Thus, velvetbean caterpillars succumbed to Anticarsia gemmatalis multiple nucleopolyhedrovirus (AgMNPV) more quickly at higher temperatures than at lower temperatures. As hypothesized, temperature likely affected caterpillars' movement rates, and thus the contact between conspecifics, which in turn affected the phenotypic expression of group‐reared caterpillars. Our results suggest that environmental factors, mainly temperature, strongly affect both the course of disease in velvetbean caterpillar population and its defenses against pathogens. As a soybean pest, velvetbean caterpillar may increase its damage on soybean fields under a scenario of global warming as caterpillars may reach the developmental resistance faster, and thus decrease their susceptibility to biological control by AgMNPV.