To improve the torque performance of the axial-flux permanent-magnet motor (AFPMM), differential evolution (DE) and cuckoo search (CS) are proposed for optimizing the motor’s structural parameters. The object of this research is an AFPMM with a single-rotor and double-stator configuration. Firstly, finite element analysis (FEA) and BP neural network machine learning (ML) were combined to obtain an ML calculator. This calculator is about the relationships between five input structural parameters of the motor and two output torque parameters (i.e., average torque and cogging torque). Then, an optimization objective function was designed to reduce the cogging torque while increasing the average output torque. And motor structural parameters were optimized using the DE and CS algorithms, respectively. Finally, air-gap flux density, average torque, cogging torque, and ripple torque before and after the optimization of the motor structure parameters are compared by FEA. The results show that both algorithms achieved almost the same optimized structural parameters. And the optimized motor has reduced cogging torque while increasing the average output torque and reducing the ripple torque. Compared with the CS, the DE is more advantageous in terms of faster iteration speed, shorter time to obtain the optimal solution, and less resource consumption.