Environmental variation plays a key role in immune development and function; factors such as pathogen exposure history, seasonality, and resource availability all affect an individual\'s immune phenotype. However, the relative contributions of heritable and non-heritable factors remain unclear for most immune phenotypes. We used populations of threespine stickleback (Gasterosteus aculeatus) with heritable differences in immune function to investigate the relationship between immunity, genetic divergence, and the environment. Fish were raised in tanks with different flow rates (continuous or intermittent) that harbored differing microbial communities. After long-term acclimation to one tank environment, a subset of adult fish were moved to the alternate flow regime and allowed to acclimate for eighteen weeks. We then measured the effects of starting environment, transfer between environments, and final environment across several immune parameters. Both population and treatment significantly affected immune function. Sticklebacks from a population previously found to display the highest heritable levels of innate immunity displayed the highest oxidative burst capacity (ROS) regardless of tank environment. However, all fish in intermittent flow tanks (both resident and transfers) tended to have higher ROS production, more granulocytes, and greater spleen mass than in continuous flow. Variation in liver mass was mainly driven by population effects. Together, this work demonstrates that a simple change in water flow dynamics can shift aquarium microbial conditions, creating opportunities to explore immune flexibility. Perhaps more importantly, we also highlight the need for further research examining how naturally evolved genetic differences and environmental factors individually and jointly influence the magnitude and direction of immune responses.