Geographic variation in parasite communities can drive evolutionary divergence in host immune genes. However, biotic and abiotic environmental variation can also induce plastic differences in immune function among populations. At present, there is little information concerning the relative magnitudes of heritable vs. induced immune divergence in natural populations. We examined immune gene expression profiles of threespine stickleback (Gasterosteus aculeatus) from six lakes on Vancouver Island, British Columbia. Parasite community composition differs between lake types (large or small, containing limnetic‐ or benthic‐like stickleback) and between watersheds. We observed corresponding differences in immune gene expression profiles among wild‐caught stickleback, using a set of seven immune genes representing distinct branches of the immune system. To evaluate the role of environmental effects on this differentiation, we experimentally transplanted wild‐caught fish into cages in their native lake, or into a nearby foreign lake. Transplanted individuals' immune gene expression converged on patterns typical of their destination lake, deviating from their native expression profile. Transplant individuals' source population had a much smaller effect, suggesting relatively weak genetic underpinning of population differences in immunity, as viewed through gene expression. This strong environmental regulation of immune gene expression provides a counterpoint to the large emerging literature documenting microevolution and genetic diversification of immune function. Our findings illustrate the value of studying immunity in natural environmental settings where the immune system has evolved and actively functions.