In urban areas, signalized intersections are hot spots of emissions and have significant negative environmental and health impacts. Ecodriving is a strategy that aims to reduce fuel consumption and emissions through the modification or optimization of driver behaviors. By the use of information on the signal phases and the queue discharge time, ecodriving could optimize the speed trajectories for a vehicle approaching an intersection to reduce fuel consumption and emissions. This research developed an optimization model to determine the optimal ecodriving trajectory (the speed profile) at a signalized intersection. The model aimed to achieve the minimization of a linear combination of emissions and travel time. The Motor Vehicle Emissions Simulator was used to estimate the emissions (nitrogen oxide), and the genetic algorithm was selected to solve the optimization problem that was developed. A sensitivity analysis was conducted to analyze and compare the performance of the optimal solution in various scenarios. The results of the case study showed that ecodriving could achieve satisfactory reductions in emissions by more than 50% and in travel time by about 7% compared with the emissions and travel times obtained by use of a normal driving strategy.