As to the task allocation of multiple UAVs to multiple targets, an improved Adaptive Mutation Particle Swarm Optimization (AMPSO) algorithm was used to seek the optimal allocation scheme. The problem of task allocation would be relatively complex if it is related to league formation, and it is impossible to obtain the optimal solution effectively right now. The mechanism of allocation priority was used to deal with the uncertainty about the remaining resources of the league members. The mapping relation between the population particles and the task-allocation scheme was established. The simulation verified that: by using AMPSO algorithm, the optimal scheme can be quickly obtained for multi-UAV to multi-target task allocation.