Alkane-degrading bacteria have long been used as an important biological indicator for oil and gas prospecting, but their ecological characteristics in hydrocarbon microseep habitats are still poorly understood. In this study, the diversity and abundance of <i>n</i>-alkane-degrading bacterial community in the near-surface soils of a Chinese onshore oil and gas field were investigated using molecular techniques. Terminal restriction fragment length polymorphism (T-RFLP) analyses in combination with cloning and sequencing of <i>alkB</i> genes revealed that Gram-negative genotypes (<i>Alcanivorax</i> and <i>Acinetobacter</i>) dominated <i>n</i>-alkane-degrading bacterial communities in the near-surface soils of oil and gas reservoirs, while the dominant microbial communities were Gram-positive bacteria (<i>Mycobacterium</i> and <i>Rhodococcus</i>) in background soil. Real-time quantitative polymerase chain reaction (PCR) results furthermore showed that the abundance of <i>alkB</i> genes increased substantially in the surface soils above oil and gas reservoirs even though only low or undetectable concentrations of hydrocarbons were measured in these soils. The results of this study implicate that trace amounts of volatile hydrocarbons migrate from oil and gas reservoirs, and likely result in the changes of microbial communities in the near-surface soil.