With the rapid advancement of unmanned aerial vehicle technology, the extensive application of multiple unmanned aerial vehicle systems in agriculture has led to significant innovations and benefits. Addressing the challenge of task allocation for multiple unmanned aerial vehicles, the primary objective is to minimize the total time required for unmanned aerial vehicles to return to their starting point after task completion. To tackle this issue, a mathematical model for the multi-constrained multiple unmanned aerial vehicle collaborative task allocation problem is developed. To efficiently solve this model, we propose an enhanced Seagull Optimization Algorithm, which integrates the Tent chaotic mapping strategy and the Lévy flight strategy. The Tent chaotic mapping helps the algorithm avoid becoming trapped in local optima, while the Lévy flight strategy, employed during the seagull attack phase, enhances the algorithm’s diversity and its ability to escape local optima. Additionally, the spiral coefficient is refined to balance the coordination between global and local searches. Simulation experiments demonstrate that the proposed algorithm can swiftly and effectively identify a reasonable task allocation scheme for solving the multi-constrained multi-UAV collaborative task allocation problem.