Ophiocordyceps contains the largest number of Cordycepssensu lato, various species of which are of great medicinal value. In this study, a new entomopathogenic fungus, Ophiocordyceps nujiangensis, from Yunnan in southwestern China, was described using morphological, phylogenetic, and mitogenomic evidence, and its fungal community composition was identified. It was morphologically characterized by a solitary, woody, and dark brown stromata, smooth-walled and septate hyphae, solitary and gradually tapering conidiogenous cells with plenty of warty protrusions, and oval or fusiform conidia (6.4–11.2 × 3.7–6.4 µm) with mucinous sheath. The phylogenetic location of O. nujiangensis was determined based on the Bayesian inference (BI) and the maximum likelihood (ML) analyses by concatenating nrSSU, nrLSU, tef-1a, rpb1, and rpb2 datasets, and ten mitochondrial protein-coding genes (PCGs) datasets (atp6, atp9, cob, cox2, nad1, nad2, nad3, nad4, nad4L, and nad5). Phylogenetic analyses revealed that O. nujiangensis belonged to the Hirsutella sinensis subclade within the Hirsutella clade of Ophiocordyceps. And O. nujiangensis was phylogenetically clustered with O. karstii, O. liangshanensis, and O. sinensis. Simultaneously, five fungal phyla and 151 fungal genera were recognized in the analysis of the fungal community of O. nujiangensis. The fungal community composition differed from that of O. sinensis, and differences in the microbial community composition of closely related species might be appropriate as further evidence for taxonomy.