The accumulation of heavy metals in the environment mainly from anthropogenic sources can be harmful to organisms. Humans, as well as many organisms are primarily exposed to heavy metals through their food source, and this can have seriously damaging effects. This study used Caenorhabditis elegans to determine the effects of feeding on bacteria exposed to heavy metal soil leachates by analysing their gene expression. The contaminated soils were collected near a glass factory in Sweden and their effect on C. elegans was compared to a lab prepared metal mixture of a similar concentration. Of the genes 16 evaluated, 8 showed a significant response when exposed to heavy metals. Sample site 1 induced up regulation in cdr-1 and cyp-35A2, and down regulation in hsp-70, hsp-16.2, and hsp-16.48. Sample site 2 induced up regulation in ftn-1 and cyp-35A2, and down regulation in mtl-1, hsp-70, hsp-16.2, and hsp-16.48. Sample site 3 induced up regulation in mtl-1, cdr-1, gst-4, and cyp-35A2. Finally, the metal cocktail induced up regulation in only mtl-1 and gst-4. The exposure of C. elegans to heavy metals through their food source did not show any signs of lethality but some of the key genes were certainly affected. This implies that the high levels of metals present in the soil leachates caused gene dysregulation in C. elegans to cope with the resultant stress. The difference between the stress response of the soil leachates and metal cocktail can be attributed to the complexity of the environmental samples which is comprised of several other components apart from metals.