Catalyzes the 6-electron oxidation of protoporphyrinogen IX to form protoporphyrin IX; under anaerobic conditions uses menaquinone as an electron acceptor, under aerobic condition uses ubiquinone as an electron acceptor. Anaerobically in vitro transfers electrons to fumarate reductase and nitrate reductase; transfer to nitrate reductase couples this reaction to electron transfer across the cell inner membrane and thus ATP synthesis (PubMed:19583219, PubMed:20484676). Neither mesoporphyrinogen nor coproporphyrinogen are substrates (PubMed:19583219). Under aerobic conditions in vitro forms protoporphyrin IX using ubiquinone as an electron acceptor, is able to transfer electrons to cytochrome bd oxidase and cytochrome bo oxidase; transfer to these oxidases couples this reaction to electron transfer across the cell inner membrane and thus ATP synthesis. In cell free extracts deletion of both cytochrome oxidases prevents formation of protoporphyrin IX (PubMed:20484676). 3 a menaquinone + protoporphyrinogen IX = 3 a menaquinol + protoporphyrin IX 3 a ubiquinone + protoporphyrinogen IX = 3 a ubiquinol + protoporphyrin IX 3 a quinone + protoporphyrinogen IX = 3 a quinol + protoporphyrin IX Binds 1 FMN non-covalently per subunit. Anaerobic activity is inhibited by pentachlorophenol. kcat for protoporphyrinogen IX is 17.52 min(-1) and for menadione is 16.86 min(-1). E(0) are -241 mV and -412 for the first and second reduction steps of HemG respectively. Porphyrin-containing compound metabolism; protoporphyrin-IX biosynthesis; protoporphyrin-IX from protoporphyrinogen-IX: step 1/1. Homotetramer (Probable). Homohexamer. Purified from membrane fractions associated with fumarate reductase (subunit FrdA) (PubMed:20484676). Loss of protoporphyrinogen IX dehydrogenase activity, grows very slowly unless supplemented with heme (PubMed:390093, PubMed:7916647, PubMed:19583219). Accumulates intermediates of heme synthesis such as uroporphyrinogen III, coproprophyrin III and protoporphyrinogen IX (PubMed:390093, PubMed:7788523). Belongs to the HemG family.