Stringent NOx emission norm for heavy duty vehicles motivates the use of predictive models to reduce emissions of diesel engines by coordinating engine parameters and aftertreatment. In this paper, a physics-based control oriented NOx model is presented to estimate the feedgas NOx for a diesel engine. This cycle averaged NOx model is able to capture the impact of all major diesel engine control variables including the fuel injection timing, injection pressure, and injection rate, as well as the effect of cylinder charge dilution and intake pressure on the emissions. The impact of the cylinder charge dilution controlled by the engine exhaust gas recirculation (EGR) in the highly diluted diesel engine of this work is modeled using an adiabatic flame temperature predictor. The model structure is developed such that it can be embedded in an engine control unit without any need for an in-cylinder pressure sensor. In addition, details of the physics-based NOx model is presented along with step by step model parameter identification and experimental validation at both steady state and transient conditions. The model accuracy was validated by experimental data and a maximum error of only 6.2% was observed with changes in engine control parameters from the nominal value. Over a complete Federal Test Procedure (FTP) cycle, on an accumulative basis the model prediction was more than 93% accurate.