Soil washing and landfarming processes are widely used to remediate total petroleum hydrocarbon (TPH)-contaminated soil, but the impact of these processes on soil bacteria is not well understood. Four different states of soil (uncontaminated soil (control), TPH-contaminated soil (CS), after soil washing (SW), and landfarming (LF)) were collected from a soil remediation facility to investigate the impact of TPH and soil remediation processes on soil bacterial populations by metagenomic analysis. Results showed that TPH contamination reduced the operational taxonomic unit (OTU) number and alpha diversity of soil bacteria. Compared to SW and LF remediation techniques, LF increased more bacterial richness and diversity than SW, indicating that LF is a more effective technique for TPH remediation in terms of microbial recovery. Among different bacterial species, Proteobacteria were the most abundant in all soil groups followed by Actinobacteria, Acidobacteria, and Firmicutes. For each soil group, the distribution pattern of the Proteobacteria class was different. The most abundant classed were Alphaproteobacteria (16.56%) in uncontaminated soils, Deltaproteobacteria (34%) in TPH-contaminated soils, Betaproteobacteria (24%) in soil washing, and Gammaproteobacteria (24%) in landfarming, respectively. TPH-degrading bacteria were detected from soil washing (23%) and TPH-contaminated soils (21%) and decreased to 12% in landfarming soil. These results suggest that soil pollution can change the diversity of microbial groups and different remediation techniques have varied effective ranges for recovering bacterial communities and diversity. In conclusion, the landfarming process of TPH remediation is more advantageous than soil washing from the perspective of bacterial ecology.