Characterizing the structure of soil microbial communities in natural habitats chronically contaminated with polycyclic aromatic hydrocarbons (PAHs) contributes to the understanding of potential risks and changes in ecological functions of contaminated soils. Microorganisms are facilitators of material cycling and functional stability in soil ecosystems. Few studies are available on the microbial community structure of soil contaminated with long-term high concentrations of PAHs. In this study, we investigated the effects of PAHs on soil microbial community structure in natural habitats using field surveys and high-throughput sequencing analysis of 16S rRNA genes in agricultural soils contaminated with PAHs around a coking plant in Shanxi. The results showed that soil microorganisms were diverse (40 phyla, 769 genera, and 1610 species). Proteobacteria, Actinobacteria, Chloroflexi, Acidobacteria, and Gemmatimonadetes were the dominant taxa, with a total abundance of 79.8%. No obvious dominant taxa was observed at the genus and species levels. Electrical conductivity (EC); pH; total organic matter (TOC); total potassium (TK); fast-acting potassium (AK); and Dibenzo(a,h)anthracene (DaA), Benzo(a)anthracene (BaA), and Anthracene (Ant) were the first drivers of the microbial community (