Natural gas has been considered to be one of the most promising alternative fuels due to its lower NOx and soot emissions, less carbon footprint as well as attractive price. Furthermore, higher octane number makes it suitable for high compression ratio application compared with other gaseous fuels. For better economical and lower emissions, a turbocharged, four strokes, direct injection, high pressure common rail diesel engine has been converted into a diesel/natural gas dual-fuel engine. For dual-fuel engine operation, natural gas as the main fuel is sequentially injected into intake manifold, and a very small amount of diesel is directly injected into cylinder as the ignition source. In this paper, a dual-fuel electronic control unit (ECU) based on the PowerPC 32-bit microprocessor was developed. It cooperates with the original diesel ECU to control the fuel injection of the diesel/natural gas dual-fuel engine. Also, a real-time diesel substitution rate control strategy for the dual-fuel engine was implemented. The validation engine results indicated that by utilizing the original diesel injection parameters (such as common rail pressure, injection fuel quantity and injection timing), both the pilot diesel and natural gas injection in the dual-fuel mode can be flexibly controlled by the dual-fuel ECU. This is accomplished without much complicated calibration work and with an average of 86% diesel substitution rate. Moreover, the PM and the NOx emissions substantially decreased in the dual-fuel mode compared to that in the pure diesel mode with a slight penalty increased THC emissions.