Abstract Microbial degradation of recalcitrant alkanes under anaerobic conditions results in the accumulation of heavy oil fraction in oil reservoirs. Hydroxylation of alkanes is an important activation mechanism under anaerobic conditions, but the diversity and distribution of the responsible microorganisms in the subsurface environment are still unclear. The lack of functional gene polymerase chain reaction (PCR) primers and commercially available intermediate degradation chemical compounds are the major obstacles for this research. In this investigation, PCR primers for the ahyA gene (encoding alkane hydroxylase) were designed, evaluated, and improved based on the nucleotide sequences available. Using microbial genomic DNA extracted from oil-contaminated soil and production water samples of oil reservoirs, ahyA gene nucleotide sequences were amplified and retrieved successfully from production water sample Z3-25 of Shengli oilfield. Additionally, the signature biomarker of 2-acetylalkanoic acid was detected in both Shengli and Jiangsu oilfields. These results demonstrate that anaerobic hydroxylation is an active mechanism used by microorganisms to degrade alkanes in oxygen-depleted oil reservoirs. This finding expands the current knowledge of biochemical reactions about alkane degradation in subsurface ecosystems. In addition, the PCR primers designed and tested in this study serve as an effective molecular tool for detecting the microorganisms responsible for anaerobic hydroxylation of alkanes in this and other ecosystems.