Using the internal transcribed spacer (ITS) region for identification, three strains ofAspergillus terreuswere identified and designated AUMC 15760, AUMC 15762, and AUMC 15763 for the Assiut University Mycological Centre culture collection. The ability of the three strains to manufacture lovastatin in solid-state fermentation (SSF) using wheat bran was assessed using gas chromatography-mass spectroscopy (GC-MS). The most potent strain was strain AUMC 15760, which was chosen to ferment nine types of lignocellulosic waste (barley bran, bean hay, date palm leaves, flax seeds, orange peels, rice straw, soy bean, sugarcane bagasse, and wheat bran), with sugarcane bagasse turning out to be the best substrate. After 10 days at pH 6.0 at 25 °C using sodium nitrate as the nitrogen source and a moisture content of 70%, the lovastatin output reached its maximum quantity (18.2 mg/g substrate). The medication was produced in lactone form as a white powder in its purest form using column chromatography. In-depth spectroscopy examination, including1H,13C-NMR, HR-ESI-MS, optical density, and LC-MS/MS analysis, as well as a comparison of the physical and spectroscopic data with published data, were used to identify the medication. At an IC50of 69.536 ± 5.73 µM, the purified lovastatin displayed DPPH activity.Staphylococcus aureusandStaphylococcus epidermidishad MICs of 1.25 mg/mL, whereasCandida albicansandCandida glabratahad MICs of 2.5 mg/mL and 5.0 mg/mL, respectively, against pure lovastatin. As a component of sustainable development, this study offers a green (environmentally friendly) method for using sugarcane bagasse waste to produce valuable chemicals and value-added commodities.