We studied the fungal endophyte community of the leaves of Myracrodruon urundeuva in Brazil along with their potential to produce L-asparaginase. In total, 187 endophytes were isolated. The colonization rate of leaf fragments from caatinga (10.41 %) was lower than those from brejo de altitude (39.58 %). Sequences of ITS rDNA from all endophytes revealed relationships with Ascomycota (Botryosphaeriales, Chaetothyriales, Diaporthales, Eurotiales, Glomerellales, Hypocreales, and Pleosporales) and Basidiomycota (Polyporales). The most frequent endophytes were members of the genus Diaporthe. Talaromyces was an indicator genus for caatinga while Phyllosticta, Diaporthe, and Colletotrichum were for brejo de altitude. The composition of endophytic fungi in caatinga and brejo de altitude differed significantly, its richness and diversity (H' = 3.41) being significantly higher in brejo de altitude. Diaporthe sp. URM 7793 was the best producer of L-asparaginase (2.41 U/g), followed by Diaporthe sp. URM 7779 (2.00 U/g), Talaromyces sp. URM 7785 (1.91 U/g), and Diaporthe sp. URM 7792 (1.47 U/g). The composition of endophytic fungi assemblages is strongly influenced by the type of ecosystem. In its natural habitat, M. urundeuva harbors an important diversity of endophytes, which could be used to produce L-asparaginase.