Microbial community composition and diversity at a diesel contaminated railway site were investigated by pyrosequencing of bacterial and archaeal 16S rRNA gene fragments to understand the inter-relationships between microbial community composition, pollution level, and soil geochemical and physical properties. To this end, 26 soil samples from four matrix types with varying geochemical characteristics and contaminant concentrations were investigated. The presence of diesel contamination significantly impacted microbial community composition and diversity, regardless of the soil matrix type. Clean samples showed higher diversity than contaminated samples (p < 0.001). Bacterial phyla with high relative abundances in all samples included Proteobacteria, Firmicutes, Actinobacteria, Acidobacteria, and Chloroflexi. High relative abundances of Archaea, specifically the phylum Euryachaeota, were observed in contaminated samples. Redundancy analysis indicated increased relative abundance of the phyla Chloroflexi, Firmicutes, and Euryachaeota correlated with the presence of contamination. Shifts in the chemical composition of diesel constituents across the site as well as the abundance of specific operational taxonomic units (OTUs, defined using a 97% sequence identity threshold) in contaminated samples together suggest that natural attenuation has occurred. OTUs with sequence similarity to strictly anaerobic Anaerolinaea within the Chloroflexi, as well as Methanosaeta, of the phylum Euryachaeota, were detected. Anaerolinaea and Methanosaeta are known to be associated with anaerobic degradation of oil related compounds, therefore suggesting natural attenuation has occurred under anoxic conditions. This research underscores the usefulness of next generation sequencing techniques both to understand the ecological impact of contamination as well as to identify potential molecular proxies for detection of natural attenuation.