To meet future emission targets, it becomes increasingly important to optimize the synergy between engine and aftertreatment system. By using an integrated control approach minimal fluid (fuel and DEF) consumption is targeted within the constraints of emission legislation during real-world operation. In such concept, the on-line availability of engine-out NOx emission is crucial. Here, the use of a Virtual NOx sensor can be of great added-value. Virtual sensing enables more direct and robust emission control allowing, for example, engine-out NOx determination during conditions in which the hardware sensor is not available, such as cold start conditions. Furthermore, with use of the virtual sensor, the engine control strategy can be directly based on NOx emission data, resulting in reduced response time and improved transient emission control. This paper presents the development and on-line implementation of a Virtual NOx sensor, using in-cylinder pressure as main input. The development steps from off-line modelling, calibration and validation towards real-time on-line implementation and validation will be presented in great detail. The Virtual NOx sensor is validated on a state-of-the-art EURO-VI Heavy Duty Diesel Engine. Steady-state validation results show that the performance of the Virtual NOx sensor is similar to the physical NOx sensor. Transient load ramp tests and frequency response function evaluation both show improved transient response from the Virtual NOx sensor. Furthermore, the Virtual NOx sensor is successfully applied as substitute for the physical NOx sensor as input to the air path controller over a transient cycle. These validation results demonstrate the application of the Virtual NOx sensor for engine control and show the potential for improved transient emission control.