Endophytic fungi associated with medicinal plants are reported as potent producers of diverse classes of secondary metabolites. In the present study, an endophytic fungi, Aspergillus clavatonanicus strain MJ31, exhibiting significant antimicrobial activity was isolated from roots of Mirabilis jalapa L., was identified by sequencing three nuclear genes i.e. internal transcribed spacers ribosomal RNA (ITS rRNA), 28S ribosomal RNA (28S rRNA) and translation elongation factor 1- alpha (EF 1α). Ethyl acetate extract of strain MJ31displayed significant antimicrobial potential against Bacillus subtilis, followed by Micrococccus luteus and Staphylococcus aureus with minimum inhibitory concentrations (MIC) of 0.078, 0.156 and 0.312 mg/ml respectively. In addition, the strain was evaluated for its ability to synthesize bioactive compounds by the amplification of polyketide synthase (PKS) and non ribosomal peptide synthetase (NRPS) genes. Further, seven antibiotics (miconazole, ketoconazole, fluconazole, ampicillin, streptomycin, chloramphenicol, and rifampicin) were detected and quantified using UPLC-ESI-MS/ MS. Additionally, thermal desorption-gas chromatography mass spectrometry (TD-GC-MS) analysis of strain MJ31 showed the presence of 28 volatile compounds. This is the first report on A. clavatonanicus as an endophyte obtained from M. jalapa. We conclude that A. clavatonanicus strain MJ31 has prolific antimicrobial potential against both plant and human pathogens and can be exploited for the discovery of new antimicrobial compounds and could be an alternate source for the production of secondary metabolites.