Cordyceps is a genus of ascomycete fungi that includes about 400 described species. All Cordyceps species are parasitic, mainly on insects and other arthropods (they are thus entomopathogenic fungi); a few are parasitic on other fungi. The best known species of the genus is Cordyceps sinensis which gives rise to the vegetable caterpillar, a precious ingredient in Chinese traditional medicines.

If a Cordyceps fungus attacks a host, the mycelium invades and eventually replaces the host tissue, while the elongated fruiting body (stroma) may be cylindrical, branched, or of complex shape. The stroma bears many small, flask-shaped perithecia that contain the asci. These in turn contain the thread-like ascospores, which usually break into fragments and are presumably infective.

Some Cordyceps species are able to affect the behavior of their insect host; Cordyceps unilateralis for instance causes ants to climb a plant and attach there before they die, assuring maximal distribution of the spores from the fruiting body that sprouts out of the dead insect's body.

The genus has a worldwide distribution and most of the approximately 400 species have been described from Asia (notably China, Japan, Korea and Thailand). Cordyceps species are particularly abundant and diverse in humid temperate and tropical forests.

The genus has many anamorphs (asexual states), of which Beauveria (possibly including Beauveria bassiana, Metarhizium, and Isaria) are the better known, since these have been used in biological control of insect pests.

Some Cordyceps species are sources of biochemicals with interesting biological and pharmacological properties, like cordycepin; the anamorph of Cordyceps subsessilis (Tolypocladium inflatum) was the source of ciclosporin — a drug helpful in human organ transplants, as it suppresses the immune system (Immunosuppressive drug).