Optimal control of wheel loaders in short loading cycles is studied in this paper. For modeling the wheel loader, the data from a validated diesel engine model is used to find a control oriented mean value engine model. The driveline is modeled as a switched system with three constant gear ratios (modes) of −60 for backwarding, 60 for forwarding, and zero for stopping. With these three modes, the sequence of active modes in a short loading cycle is fixed as backwarding, stopping, forwarding, and stopping. For the control part, it is assumed that the optimal path is known a priori. Given the mode sequence, the control objective is finding the optimal switching time instants between the modes while the wheel loader tracks the optimal path. To solve the optimal control problem, approximate dynamic programming is used. Simulation results are provided to show the effectiveness of the solution.