Fungal infections currently pose a real threat to human lives. In the current study, soil bacterial isolates were screened for the production of antifungal compounds to combat human fungal pathogens. Notably, the bacterial F1 isolate exhibited antimycotic action towards the Candida albicans ATCC 10231 and Aspergillus niger clinical isolates. By employing phenotypic and molecular techniques, we identified the F1 isolate as the Bacillus toyonensis isolate OQ071612. The purified extract showed stability within a pH range of 6–7 and at temperatures of up to 50 °C. It demonstrated potential antifungal activity in the presence of various surfactants, detergents, and enzymes. The purified extract was identified as 6-methoxy-1H-Indole-2-carboxylic acid using advanced spectroscopic techniques. To optimize the antifungal metabolite production, we utilized response surface methodology (RSM) with a face-centered central composite design, considering nutritional and environmental variables. The optimal conditions were as follows: starch (5 g/L), peptone (5 g/L), agitation rate of 150 rpm, pH 6, and 40 °C temperature. A confirmatory experiment validated the accuracy of the optimization process, resulting in an approximately 3.49-fold increase in production. This is the first documented report on the production and characterization of 6-methoxy-1H-Indole-2-carboxylic acid (MICA) antifungal metabolite from Bacillus toyonensis.