The present study focuses on the observation of knock phenomena in a small-bore optical diesel engine. Current understanding is that a drastic increase of pressure during the premixed burn phase of the diesel combustion causes gas cavity resonances, which in turn induce a high frequency pressure ringing. The frequency and severity of this ringing can be easily measured by using a pressure transducer. However, visual information of flames under knocking conditions is limited especially for a small-bore diesel engine. To fill this gap, high-speed imaging of soot luminosity is performed in conjunction with in-cylinder pressure measurement during knocking cycles in an automotive-size optical diesel engine. From the experiments, flames were observed to oscillate against the direction of the swirl flow when the pressure ringing occurred. A direct correspondence between the flame oscillation and pressure ringing was found: the flame oscillating periodicity observed from the high-speed movie matched well with the frequency of the fluctuating pressure measured from the spectral analysis of in-cylinder pressure. A simple theory suggests that the second circumferential mode of resonance caused the oscillation. A subsequent study using pilot injection was conducted to investigate its remedial effect on diesel knock and to capture its corresponding flame behaviour. Analysis of the pressure trace and images of the pilot-injected case show no ringing and oscillation, providing further evidence of the correspondence between the pressure ringing and flame oscillation.