The article presents the possibility of using self-learning control algorithms to manage subassemblies of an internal combustion engine in order to reduce exhaust emissions to the natural environment. In compression ignition (CI) engines, the issue of emissions mainly concerns two components: particulate matter (PM) and nitrogen oxides (NOx). The work focuses mainly on the possibility of reducing the emission of nitrogen oxides. It is assumed that the particularly problematic points when it comes to excessive emission of harmful substances are the dynamic states in which combustion engines operate constantly. In dynamically changing operating points, it is very difficult to choose the right setting of actuators such as the exhaust gas recirculation (EGR) valve to ensure the correct operation of the unit and the minimum emission of these substances. In the light of the above, an attempt was made to develop a self-learning mathematical model, which can predict estimated emission levels of selected substance basing on current measurement signals (e.g. air, pressure, crankshaft rotational speed, etc.). The article presents the results of the estimation of nitrogen oxides by the trained neural network in comparison to the values measured with the use of a sensor installed in the exhaust system. The presented levels of estimated and measured results are very similar to each other and shifted over time in favour of neural networks, where the information about the emission level appears much earlier. On the basis of the estimated level, it shall be possible to make an appropriate decision about specific settings of recirculation system components, such as the EGR valve. It is estimated that by using the chosen control method it is possible significantly to reduce the emission of harmful substances into the natural environment while maintaining dynamic properties of the engine.