This paper presents a novel engine controller targeting the reduction of gas emissions. Toxic emissions, such as Carbon Monoxide (CO) and Nitric Oxide (NOx) affect the environment and the authorities aim to limit their amount by law. Emissions are formed during the high temperature combustion process, and can be optimised by adjusting some engine operating parameters. In this paper, the model describing emissions output of the engine as a function of engine control parameters is represented as a state-space system. A closed-loop controller is developed by using statefeedback control algorithm. The closed-loop gain, K, is obtained from the LQR tuning principles. The fuel estimator developed in previous works is used in order to reduce the model from the 8th order. The results show that the controller is able to control emission to the minimum in all constraints while keeping engine running in the same performance