Kojic acid is a wonderful fungal secondary metabolite that has several applications in the food, medical, and agriculture sectors. Many human diseases become resistant to normal antibiotics and normal treatments. We need to search for alternative treatment sources and understand their mode of action. Aspergillus flavus ASU45 (OL314748) was isolated from the caraway rhizosphere as a non-aflatoxin producer and identified genetically using 18S rRNA gene sequencing. After applying the Box-Behnken statistical design to maximize KA production, the production raised from 39.96 to 81.59 g/l utilizing (g/l) glucose 150, yeast extract 5, KH2PO4 1, MgSO4.7H2O 2, and medium pH 3 with a coefficient (R2) of 98.45%. Extracted KA was characterized using FTIR, XRD, and a scanning electron microscope. Crystalized KA was an effective antibacterial agent against six human pathogenic bacteria (Bacillus cereus, Staphylococcus aureus, Escherichia coli, Klebsiella pneumonia, Serratia marcescens, and Serratia plymuthica). KA achieves high inhibition activity against Bacillus cereus, K. pneumonia, and S. plymuthica at 100 μg/ml concentration by 2.75, 2.85, and 2.85 compared with chloramphenicol which gives inhibition zones 1, 1.1, and 1.6, respectively. Crystalized KA had anticancer activity versus three types of cancer cell lines (Mcf-7, HepG2, and Huh7) and demonstrated high cytotoxic capabilities on HepG-2 cells that propose strong antitumor potent of KA versus hepatocellular carcinoma. The antibacterial and anticancer modes of action were illustrated using the molecular docking technique. Crystalized kojic acid from a biological source represented a promising microbial metabolite that could be utilized as an alternative antibacterial and anticancer agent effectively.