This paper presents a model-based control and calibration design method for online cost-based optimization of engine-aftertreatment operation under all operating conditions. The so-called Integrated Emission Management (IEM) strategy online minimizes the fuel and AbBlue consumption. Based on the actual state of engine and aftertreatment systems, optimal air management settings are determined for EGR-SCR balancing. Following a model-based approach, the strategy allows for a systematic control design and calibration procedure for engine and aftertreatment systems.The potential of this time efficient method is demonstrated by experiments for a heavy-duty Euro-VI engine. The Integrated Emission Management strategy is developed and calibrated offline over a cold and hot World Harmonized Transient Cycle (WHTC) for the set emission targets.The total IEM development and calibration process takes approximately 20 weeks from model identification to the acceptance tests. Moreover, by only changing the software settings, the existing hardware performance increases: the WHTC results show a 1.1% operational cost reduction and corresponding 1.4% fuel consumption reduction (and by that CO₂) compared to the baseline Euro-VI strategy. Further potential benefits include reduced heat rejection in the EGR system and reduced DPF regeneration frequency. The presented approach offers also a generic framework for future extension with Waste Heat Recovery and hybrid electric drivetrain functions: Integrated Emission and Energy Management.