This paper develops a two-layer optimization approach that provides energy-optimal control for vehicles and traffic signal controllers. The optimizer in the first layer computes the traffic signal timings to minimize the total energy consumption levels of approaching vehicles from upstream traffic. The traffic signal optimization can be easily implemented in real-time signal controllers, and it overcomes the issues in the traditional Webster’s method of overestimating the cycle length when the traffic volume-to-capacity ratio exceeds 50 percent. The second layer optimizer is the vehicle speed controller, which calculates the optimal vehicle brake and throttle levels to minimize the energy consumption of individual vehicles. The A-star dynamic programming is used to solve the formulated optimization problem in the second layer to expedite the computation speed so that the optimal vehicle trajectories can be computed in real-time and can be easily implemented in simulation software for testing. The proposed integrated controller is first tested on an isolated signalized intersection, and then an arterial network with multiple intersections to investigate the performance of the proposed controller under various traffic demand levels. The test results demonstrate that the proposed integrated controller can greatly improve energy efficiency with fuel savings up to 17.7%, at the same time enhancing traffic mobility by up to 47.18% reduction in traffic delay and up to 24.84% reduction in vehicle stops.