Concerns about energy conservation and emission reduction have highlighted the importance of environmentally sound logistics networks in urban areas. These networks are deeply intertwined with urban traffic systems, where variations in transit speeds can significantly increase the energy consumption and carbon emissions of delivery vehicles, compromising the environmental sustainability of urban deliveries. To address this, we propose a multidepot time-dependent vehicle routing problem with time windows, enhancing route planning flexibility and resource configuration. Our approach begins with a route spatiotemporal decomposition method to estimate vehicle travel times and emissions based on varying vehicle speeds. We then develop a multiobjective mixed integer linear programming model that aims to minimize total operating costs, the number of vehicles, and carbon dioxide emissions. A hybrid heuristic algorithm combining spectral clustering, multiobjective ant colony optimization, and variable neighborhood search is proposed to solve the model. This algorithm incorporates collaboration and resource sharing strategies, a pheromone initialization mechanism, a novel heuristic operator that accounts for time dependency, and a self-adaptive update mechanism, enhancing both solution quality and algorithm convergence. We compare the performance of our algorithm with that of the CPLEX solver, multiobjective ant colony optimization, non-dominated sorting genetic algorithm-Ⅲ, and multiobjective particle swarm optimization. The results demonstrate the superior convergence, uniformity, and spread of our proposed algorithm. Furthermore, we apply our model and algorithm to a real-world case in Chongqing, China, analyzing optimized results for different time intervals and vehicle speeds. This study offers robust methodologies for theoretically and practically addressing the multidepot time-dependent vehicle routing problem with time windows, contributing to the development of economical, efficient, collaborative, and sustainable urban logistics networks.