Cordyceps cicadae (Chanhua) is a parasitic fungus that grows on Cicada flammata larvae and is used to relieve exhaustion and treat numerous diseases, in part through its active constituent, cordycepin. We used de novo Illumina HiSeq 4000 sequencing to obtain transcriptomes of C. cicadae mycelium, fruiting body, and sclerotium, and identify differentially expressed genes. In the mycelium versus sclerotium libraries, 1576 upregulated and 2300 downregulated genes were identified. In the mycelium versus fruiting body and fruiting body versus sclerotium body libraries, 1604 and 1474 upregulated and 1365 and 1320 downregulated genes, respectively, were identified. Gene Ontology and Kyoto Encyclopedia of Genes and Genomes analyses identified 19 genes differentially expressed in mycelium versus fruiting body as related to the purine pathway, along with 28 and 16 genes differentially expressed in the mycelium versus sclerotium and fruiting body versus sclerotium groups, respectively. Gene expression of six key enzymes was validated by quantitative polymerase chain reaction. Specifically, 5′-nucleotidase (c62060g1) and adenosine deaminase (c35629g1) in purine nucleotide metabolism, which are involved in cordycepin biosynthesis, were significantly upregulated in the sclerotium group. These findings improved our understanding of genes involved in the biosynthesis of cordycepin and other characteristic secondary metabolites in C. cicadae.