Microbial diversity and activities in petroleum reservoir systems can be altered by water-flooding operation, but the current understanding of the mechanism for such changes in microbial composition characteristics and community is inadequate. In this study, microbial communities especially functional groups in production water from five petroleum reservoirs in China were investigated by chemical and molecular biological analyses. The dominant and core phyla in the five oil reservoirs were Proteobacteria, Deferribacterota, Firmicutes, Desulfobacterota, Euryarchaeota and Thermoplasmatota. At the genus level, the dominant taxa in each petroleum reservoir were different, and not all of the dominant genera were the core members across the five oil reservoirs. The microbiologically influenced corrosion (MIC) were investigated for the functional groups in each production water. The corrosion rates in production water were higher than controls with a positive correlation to the abundances of sulfate-reducing prokaryotes (SRP). The SRP diversity based on the aprA and dsrA gene analysis showed that obvious differences were evident between onshore (JS, SL, DQ and XJ) and offshore (BS) oilfields. The core SRP taxa in onshore oilfields were Desulfomicrobium and Desulfovibrio, also with Desulfotomaculum in medium/low-temperature oil reservoirs (DQ and XJ), but in high-temperature petroleum reservoirs (JS, BS and SL), Archaeoglobus, Thermodesulfobacterium and Thermodesulfovibrio were the core groups. Statistical analysis indicated that temperature, electron acceptors and donors showed significant influence on the SRP community. This research reveals the characteristics of microbial and functional community as well as their interaction mechanism on corrosion in petroleum reservoir environments, and will improve industrial bio-control and management of MIC in oilfields.