Various types of organisms, mainly fungi and bacteria, live within vegetal organs and tissues, without causing damage to the plant. These microorganisms, which are called endophytes, can be useful for biological control and plant growth promotion; bioactive compounds from these organisms may have medical and pharmaceutical applications. Trichilia elegans (Meliaceae) is a native tree that grows abundantly in several regions of Brazil. Preparations using the leaves, seeds, bark, and roots of many species of the Meliaceae family have been widely used in traditional medicine, and some members of the Trichilia genus are used in Brazilian popular medicine. We assessed the diversity of endophytic fungi from two wild specimens of T. elegans, collected from a forest remnant, by sequencing ITS1-5.8S-ITS2 of rDNA of the isolates. The fungi were isolated and purified; 97 endophytic fungi were found; they were separated into 17 morpho-groups. Of the 97 endophytic fungi, four genera (Phomopsis, Diaporthe, Dothideomycete, and Cordyceps) with 11 morpho-groups were identified. Phomopsis was the most frequent genus among the identified endophytes. Phylogenetic analysis showed two major clades:Sordariomycetes, which includes three genera, Phomopsis, Diaporthe, and Cordyceps, and the clade Dothideomycetes, which was represented by the order Pleosporales.