Aspergillus flavus (A. flavus), a frequent contaminant in silage, is a significant producer of aflatoxins, notably the potent carcinogen aflatoxin B1. This contaminant poses a potential risk during the initial aerobic phase of ensiling. The present work studied the impact of temperature on A. flavus growth and aflatoxin B1 production in laboratory-scale sorghum silos during the initial aerobic phase. Growth curves of A. flavus were generated at various temperatures and modeled with the Gompertz model. Results indicated that the optimal temperature range for the maximum growth rate in sorghum mini-silos is between 25 and 30°C. Mold biomass and aflatoxin B1 levels were quantified using qPCR and HPLC, respectively. A predictive model for aflatoxin B1 synthesis in the initial ensiling phase was established, in function of grain moisture, external temperature, and time. Within the studied range, A. flavus’s initial concentration did not significantly influence aflatoxin B1 production. According to the model maximum aflatoxin production is expected at 30% moisture and 25°C temperature, after 6 days in the aerobic phase. Aflatoxin B1 production in such conditions was corroborated experimentally. Growth curves and aflatoxin B1 production highlighted that at 48 h of incubation under optimal conditions, aflatoxin B1 concentrations in mini-silos exceeded national legislation limits, reaching values close to 100 ppb. These results underscore the risk associated with A. flavus presence in ensiling material, emphasizing the importance of controlling its development in sorghum silos.