The dynamics model and model-based controller (LQG servo controller) have been constructed to improve performance of diesel engine in transient condition. The input parameters of the model are fuel quantity of main injection, timing of main injection, fuel quantity of pilot injection, timing of pilot injection, external EGR ratio and boost pressure. The parameters that are succeeded between cycles to express transient condition are residual gas temperature and of residual oxygen. In the model, one cycle is discretized into 10 representative points. The precision of the accuracy of the model and the responsiveness of the controller were confirmed.