Detailed chemical kinetics was implemented into an engine CFD code to study the combustion process in Homogeneous Charge Compression Ignition (HCCI) engines. The CHEMKIN code was implemented into KIVA-3V such that the chemistry and flow solutions were coupled. Effects of turbulent mixing on the reaction rates were also considered. The model was validated using experimental data from a direct-injection Caterpillar engine operated in the HCCI mode using gasoline. The results show that good levels of agreement were obtained using the present KIVA/CHEMKIN model for a wide range of engine conditions including various injection timings, engine speeds, and loads. It was found that the effects of turbulent mixing on the reaction rates needed to be considered to correctly simulate the combustion phasing. It was also found that the presence of residual radicals could enhance the mixture reactivity and hence shorten the ignition delay time. The NOx emissions were found to increase as the injection timing was retarded, in agreement with experimental results.