Cordyceps militaris is considered to be of great medicinal potential due to its remarkable pharmacological effects, safety, and edible characteristics. With the completion of the genome sequence and the advancement of efficient gene-editing technologies, coupled with the identification of gene functions in Cordyceps militaris, this fungus is poised to emerge as an outstanding strain for medicinal engineering applications. This review focuses on the development and application of genomic editing techniques, including Agrobacterium tumefaciens-mediated transformation (ATMT), PEG-mediated protoplast transformation (PMT), and CRISPR/Cas9. Through the application of these techniques, researchers can engineer the biosynthetic pathways of valuable secondary metabolites to boost yields; such metabolites include cordycepin, polysaccharides, and ergothioneine. Furthermore, by identifying and modifying genes that influence the growth, disease resistance, and tolerance to environmental stress in Cordyceps militaris, it is possible to stimulate growth, enhance desirable traits, and increase resilience to unfavorable conditions. Finally, the green sustainable industrial development of C. militaris using agricultural waste to produce high-value-added products and the future research directions of C. militaris were discussed. This review will provide future directions for the large-scale production of bioactive ingredients, molecular breeding, and sustainable development of C. militaris.