The ascomycete fungus Beauveria bassiana is a pathogen of hundreds of insect species and is commercially produced as an environmentally friendly mycoinsecticide. We sequenced the genome of B. bassiana and a phylogenomic analysis confirmed that ascomycete entomopathogenicity is polyphyletic, but also revealed convergent evolution to insect pathogenicity. We also found many species-specific virulence genes and gene family expansions and contractions that correlate with host ranges and pathogenic strategies. These include B. bassiana having many more bacterial-like toxins (suggesting an unsuspected potential for oral toxicity) and effector-type proteins. The genome also revealed that B. bassiana resembles the closely related Cordyceps militaris in being heterothallic, although its sexual stage is rarely observed. A high throughput RNA-seq transcriptomic analysis revealed that B. bassiana could sense and adapt to different environmental niches by activating well-defined gene sets. The information from this study will facilitate further development of B. bassiana as a cost-effective mycoinsecticide.