Microcosm experiments were conducted with soils contaminated with heavy metals (Pb and Cr) and aromatic hydrocarbons to determine the effects of each upon microbial community structure and function. Organic substrates were added as a driving force for change in the microbial community. Glucose represented an energy source used by a broad variety of bacteria, whereas fewer soil species were expected to use xylene. The metal amendments were chosen to inhibit the acute rate of organic mineralization by either 50% or 90%, and lower mineralization rates persisted over the entire 31-day incubation period. Significant biomass increases were abolished when metals were added in addition to organic carbon. The addition of organic carbon alone had the most significant impact on community composition and led to the proliferation of a few dominant phylotypes, as detected by PCR-denaturing gradient gel electrophoresis of bacterial 16S rRNA genes. However, the community-wide effects of heavy metal addition differed between the two carbon sources. For glucose, either Pb or Cr produced large changes and replacement with new phylotypes. In contrast, many phylotypes selected by xylene treatment were retained when either metal was added. Members of the Actinomycetales were very prevalent in microcosms with xylene and Cr(VI); gene copy numbers of biphenyl dioxygenase and phenol hydroxylase (but not other oxygenases) were elevated in these microcosms, as determined by real-time PCR. Much lower metal concentrations were needed to inhibit the catabolism of xylene than of glucose. Cr(VI) appeared to be reduced during the 31-day incubations, hut in the case of glucose there was substantial microbial activity when much of the Cr(VI) remained. In the case of xylene, this was less clear.