Here, we present a protocol to use an anaerobic whole-cell microbial biosensor to evaluate how different environmental variables affect the bioavailability of Hg and Cd to bacteria in anoxic environments.