In recent years, the waste produced as a result of the production and consumption activities of urban residents has led to significant environmental degradation and resource wastage. This paper focuses on the research object of municipal solid waste (MSW) collection and transportation based on the concept of “sustainable development and green economy”. Firstly, this study examines the current state of urban domestic garbage collection and transportation. It analyzes the following challenges and deficiencies of the existing collection and transportation system: (1) the operating efficiency of garbage collection vehicles is low, resulting in a significant accumulation of waste on the roadside and within the community; (2) the vehicle collection and transportation routes are fixed, and there are empty vehicles running; (3) the amount of garbage on a route exceeds the vehicle’s loading capacity, which requires the vehicle to perform a second round of collection and transportation. To enhance the efficiency of urban garbage collection and transportation and minimize the collection and transportation costs, we are investigating the problem of optimizing the path for green vehicles. To comprehensively optimize the fixed cost, variable cost, and carbon emission cost incurred during vehicle operation, a vehicle routing model with time windows is established, taking into account vehicle load constraints. Carbon emission coefficient and carbon tax parameters are introduced into the model and the “fuel-carbon emission” conversion method is used to measure the carbon cost of enterprises. An improved ant colony optimization (ACO) method is proposed: (1) the introduction of a vehicle load factor improves the ant state transfer method; (2) the updated pheromone method is improved, and additional pheromone is added to both the feasible path and the path with the minimum objective function; (3) the max–min ACO algorithm is introduced to address the issue of premature convergence of the algorithm; (4) the embedding of a 2-opt algorithm further prevents the ACO algorithm from falling into the local optimum. Finally, the calculation results based on the example data demonstrate that the algorithm has a significant advantage over the genetic algorithm (GA) and particle swarm optimization (PSO) algorithm. The total transportation distance determined by this algorithm is shorter than that of the GA and PSO methods, and the total cost of the scheme is 1.66% and 1.89% lower than that determined by GA and PSO, respectively. Compared to the data from the actual case, the number of vehicles required in the operation of this algorithm and model is reduced by three. Additionally, the total cost, fixed cost, and carbon emission cost incurred by the vehicles during operation were reduced by 31.2%, 60%, and 25.3% respectively. The results of this study help the station to collect and distribute waste efficiently, while also achieving the goals of energy saving, consumption reduction, and emission reduction.