The goal of this research was to study and quantify the effect of exhaust valve timing and residual gas dilution on in-cylinder flow patterns, flame propagation and heat release characteristics in a spark ignition engine. Experiments were carried out in a recently developed single cylinder optical engine. Particle image velocimetry (PIV) was applied to measuring and evaluating the in-cylinder flow field. Detailed analysis of flame images combined with heat release data was presented for several engine operating conditions, giving insight into the combustion process in terms of visible flame area and flame expansion speed. Results from PIV measurement indicates that the limited alteration of the in-cylinder bulk flow could be observed with the variation of exhaust valve timing. The in-cylinder fluctuating kinetic energies and their Coefficient of Variations (COVs) decrease with the advance of the exhaust valve timing. Analysis based on the chemiluminescence imaging and the in-cylinder pressure shows that faster flame kernel formation and less distortion of flame shape in the early flame development stage could be obtained by the initial advance of exhaust valve timing, which benefits the combustion event by advancing the combustion timing and shortening the ignition delay and combustion duration without much increase in Coefficient of Variation of Indicated Mean Effective Pressure (COVIMEP). By further advancing the exhaust valve timing to 32 CA Before Top Dead Center (BTDC), the combustion severely deteriorates with retarded combustion timing and higher cyclic variations, caused by the higher dilution level and lower fluctuation kinetic energy.