Diesel engines become more and more complex systems, especially due to increasingly restrictive emission laws. The selective catalytic reduction (SCR) is a promising way to lower nitrogen oxide emissions. The slow dynamics of the catalyst, however, have to be compensated by the engine, for example to comply with emission laws during transients. This work presents a bi-level nonlinear model predictive control (MPC) concept for a diesel engine with an upper MPC layer to account for the SCR catalyst and a lower MPC layer to control the engine. The resulting hierarchical MPC structure is able to solve the overall control problem in real-time on ECU level using suitable MPC formulations as well as interconnecting variables. The numerical solution is based on an augmented Lagrangian MPC algorithm and control-oriented models. Simulation results against a detailed reference model of the overall system demonstrate the high performance of the hierarchical MPC concept.