In vehicular edge computing, both edge and cloud can provide computing services (i.e., tasks). The edge can reduce vehicular task delay by processing data nearby, but is resource‐constrained and cannot handle too many tasks simultaneously. The resource‐rich cloud can handle massive tasks, but is far from users and has low quality of service and energy efficiency. Currently, some work has been done on task offloading for edge‐cloud collaboration. However, either the collaboration among multiple devices is not considered and the load is easily imbalanced; or edge‐cloud collaboration is required for offloading decisions with too many parameters, affecting tasks to be processed efficiently. To address these issues, we learn from the swarm intelligence evolution of sparrow foraging, improve a sparrow search algorithm by integrating three strategies of flyer refine producer update, sin/cos perturbation follower update, and adaptive adjustment agitator update, to optimize the vehicular task offloading location for edge‐cloud collaboration. Furthermore, we combine delay relaxation variables and delay‐energy penalty operator to design a lightweight heuristic task offloading algorithm, and greedily compare the task preoffload location sets with different delay constraints based on the improved sparrow search algorithm, to obtain the optimal task offloading with integrated delay and energy. Simulation experiments verify that our approach can improve the algorithm's optimization accuracy, convergence speed, and robustness. Moreover, the average task delay, total task energy consumption, and load balance degree of our approach outperform the five benchmark algorithms, and can comprehensively optimize task delay and energy consumption, and achieve edge devices load balancing.