Biodiesel is a sustainable, and renewable alternative to fossil fuels that can be produced from various biological sources with the aid of lipases. This study developed a simple and novel fungal system for lipase biosynthesis to be used for catalyzing the oily residuals into biodiesel, employing the artificial neural network (ANN), and semi-solid-state fermentation (SSSF). Nigella sativa was selected among agro-industrial oily residuals as a substrate for lipase biosynthesis by Aspergillus flavipes MH47297. The effect of cultural humidity (X1), the surfactant; Brij 35 (X2), and inoculum density (X3) on lipase biosynthesis were researched based on the matrix of Box-Behnken design (BBD). The ANN together with a new fungal candidate and SSSF were then applied for the first time to model the biosynthesis process of lipase. The optimum predicted cultural conditions varied according to the model. The optimum predicted conditions were estimated separately by BBD (X1 = 5.8 ml water/g, X2 = 46.6 μl/g, and X3 = 62156610 spore/g) and ANN (X1 = 5.4 ml water/g, X2 = 54.2 μl/g, and X3 = 100000000 spore/g) models. Based on the modeling process, the response of lipase was calculated to be 214.95 (BBD) and 217.72 U (ANN), which revealed high consistency with the experimental lipase yield (209.13 ± 3.27 U for BBD, and 218 ± 2.01 U for ANN). Despite both models showing high accuracy, ANN was more accurate and surpassed the BBD model. Gas chromatography analysis showed that lipase successfully converted corn oil to biodiesel (29.5 mg/l).