A ducted unmanned aerial vehicle anti-sway method based on optimized quadratic form control of artificial bee colony includes eight steps: 1, the mathematical model for pendulum oscillation is built; 2, control structure and control law are designed; 3, the parameters of the artificial bee colony algorithm and the employed bee colony are initialized; 4, the performance indicator function of the linear quadratic form is calculated according to individual parameters; 5, worker bees select bee individuals with better fitness as leading bees according to the fitness value of each employed bee, and each worker bee continues to seek for honey sources near the leading bee solution space and the fitness value is calculated; 6, if the number of searches Bas is greater than the set threshold, the employed bees seek for new honey sources again, namely parameter values are initialized again; 7, by the greedy selection method, the positions of the employed bees are updated with larger fitness values, and searches proceed near solution spaces; and 8, the Step 4 is carried out repeatedly until T > Tmax, and the optimum component weighted value parameter, the optimum feedback gain matrix and the optimum fitness value are output.