At present, more and more e-commerce logistics use airfreight. To further optimize the freight loading problem, this study first established the freight loading optimization model, improved the genetic algorithm to solve the model, and made an example analysis. It was found that the load utilization rate was 96.63%, and the space utilization rate was 92.95% in the scheme obtained by the algorithm proposed in this study, which was higher than those of the other two algorithms. In the aspect of calculation time, the method proposed in this study could obtain the optimal scheme in 56.78 s. The experimental results show that the proposed algorithm performs better in the loading optimization problem and can be further promoted and applied.