In order to further improve the output torque and stability of the external rotor permanent magnet synchronous motor, a double‐layer non‐uniform Halbach external rotor permanent magnet synchronous motor (DNH) structure is proposed and optimised. Finite element models of DNH and other structures are established to compare the electromagnetic characteristics of these motors and verify the superiority of the proposed structure. Secondly, the multi‐objective whale optimisation algorithm is improved, and the algorithm is tested by test function to verify the improvement effect. Further, the Spearman correlation of the parameters is calculated, and the parameters are layered. The first layer parameters are optimised by the improved multi‐objective whale optimisation algorithm, and the second layer parameters are optimised by parameter scanning. Finally, the motor performance of the initial scheme, single layer optimisation scheme, and hierarchical optimisation scheme is compared by simulation. The simulation results show that the hierarchical optimisation method is superior to the single layer optimisation method. By comparing with other schemes, the performance advantages of hierarchical optimisation DNH in terms of average output torque, cogging torque, torque ripple, permanent magnet cost and other parameters are proved, as well as the effectiveness of the optimisation method.