Airflow assisted with sprayers can change not only the canopy’s porosity, but also allow the droplets to enter its interior. It is important to depict the airflow velocity distribution in a dense crop canopy quantitatively to optimize the goal of uniform deposition of droplets and full coverage within the canopy. However, there is yet no effective way to do so. The contribution of this paper is to propose a digital method to predict airflow distribution in the canopy using computational fluid dynamics (CFD) and machine-learning (ML) methods. Firstly, a virtual, simplified 3D cotton plant is generated based upon the phenotypic traits and the Logistic growth function to describe such canopy architecture parameters as leaf area density (LAD) and porosity quantitatively at any position in the canopy. Secondly, to solve the problem of uneven distribution of airflow in the canopy, in the CFD model, the target area surrounded by the main stems of 4 adjacent 3D cotton plants is selected as a stratified sub-regional porous medium (SSPM), and the accuracy of the CFD simulations is compared to the indoor measurements. Thereafter, a range of ML algorithms are trained with the velocity dataset obtained from the CFD results under different spray operating parameters (initial air velocity, canopy depth, LAD, and porosity). The comparison of CFD simulations and actual airflow measurements shows that the mean normalized mean absolute errors (NMAEs) of the lower, middle, and upper layers are 17.38 %, 21.35 %, and 9.75 % respectively. The Random Forest method has greater prediction accuracy, with a Coefficient of Determination (R2) of 0.9882 and Root Mean Squared Error (RMSE) of 0.5071, which indicates excellent agreement with the CFD simulation results. Therefore, such a data-driven model of airflow velocity distribution in a dense crop canopy can be used to optimize the operation parameters and eliminate complex CFD simulations or tedious physical experiments.