Environmental stress, which increases population mortality and can drive extinction, forces populations to move away from stressful regions and look for desirable environments. Much work has quantified the effects of stressors on individual vital rates and population dynamics. However, less is understood about the effects of stressors at large spatial levels, such as metapopulation and metacommunity levels. Furthermore, species may respond differently to the same spatial distributions of resource and toxicant according to their characteristics, such as their movement strategies. Whereas it remains unclear to determine the optimal movement strategy when a resource and a stressor occur simultaneously and distribute in the same or opposite patterns. We aim to test the hypothesis that as environments became more spatially heterogeneous, the slower movers would exclude the faster movers, having a greater population abundance. We created patterns of different spatial distributions of resource and toxicant by using 3D printed blocks to place the E. coli (resource) and copper sulfate solution (toxicant) in specific shapes in square (100mmx100mm) petri dishes. We used two locomotion speeds of Caenorhabditis elegans (low and high), foraging in each experimental environment for four days when they nearly deplete E. coli on each plate and the majority of the worms reach the L4-stage, which along with adult animals, are easiest to score under the microscope. Upon completion, population abundance was measured by counting the total number of worms ranging from L3 to adult stage individuals on each plate. We found that when resources and toxin are spatially overlapped, fast movement is a better strategy because it allows them to use food and move to empty areas to reproduce, then move back to get more food. However, slow movers spend more time in areas where both resource and toxin occur, which resulted in a significantly lower population abundance than fast movers. Additionally, we found that an amount of toxicant overlapped over food resources would cause a greater population decline than an equal amount of toxicant less overlapped with the resource. Our understanding will help us predict species responses to environmental stressors in natural systems.