An entomopathogenic fungus, Cordyceps sp. has been known to produce cordycepin which is a purine nucleoside antimetabolite and antibiotic with potential anticancer, antioxidant and anti‐inflammatory activities. Interestingly, Cordyceps militaris produces significantly higher amount in a liquid surface culture than in a submerged culture. The liquid surface culture consists of mycelia growing into the air (aerial mycelia) and mycelia growing toward the bottom into the medium (submerged mycelia). In this study, to clarify roles of aerial and submerged mycelia of C. militaris in the cordycepin production the difference in metabolism between these mycelia was investigated. From transcriptomic analyses of the aerial and submerged mycelia at the culture of 5, 12 and 19 days, the metabolism of the submerged mycelia switched from the oxidative phosphorylation to the fermentation pathway. This activated the pentose phosphate pathway to provide building block materials for the nucleotide biosynthetic pathway. Under hypoxic conditions, the 5‐aminolevulinic acid synthase (CCM_01504), delta‐aminolevulinic acid dehydratase (CCM_00935), coproporphyrinogen III oxidase (CCM_07483) and cytochrome c oxidase 15 (CCM_05057) genes of heme biosynthesis were significantly upregulated. In addition, the liquid surface culture revealed that metabolite coproporhyrinogen III and glycine, the product and precursor of heme, were increased at 12th day and decreased at 19th day, respectively. These results indicate that the submerged mycelia induce the activation of iron acquisition, the ergosterol biosynthetic pathway, and the iron cluster genes of cordycepin biosynthesis in a hypoxic condition. Even though, the expression of the cluster genes of cordycepin biosynthesis was not significantly different in both types of mycelia.