The aim of this paper is to develope a mechatronic control system to replace mechanical fuel injection system of a four-cylinder automotive diesel engine, to study what are the important electronics fuel injection parameters which have the highest effect on the engine performance. All the paperwork performed on Isuzu engine 4HF1 which is 4 cylinder diesel engine working with fully mechanical fuel injection system. To develop mechatronics fuel system, must install crank sensor which measure the engine speed in RPM and specify the piston position, cam sensor which specifies the injection order, common rail fuel injection system which includes electronic injectors, high pressure pump and common rail, ECU which control all the system inputs and outputs and injectors driver controller which responsible for delivering the required high voltage for the injectors with high speed switching. ECU software will be developed from scratch to develop injection quantity, injection time and injection order output signals to be compatible with the common rail fuel system. Mathworks tools (Matlab-Simulink-Stateflow) will be used for developing ECU software application layer which divided into many models as crankshaft speed model, crankshaft sensor piston position, cam sensor injection order model, pedal speed model, injectors model, torque model and final model which collect all the previous models. Embedded coder toolbox will be used for generating C code which will be integrated with the microcontroller layer and uploaded to the selected ECU.