In this paper we investigate two-dimensional (2D) Rayleigh–B ́enard convection using direct numerical simulation in Boussinesq fluids with Prandtl number $P = 6.8$ confined between thermally conducting plates. We show through the simulation that in a small range of reduced Rayleigh number $r (770 < r < 890)$ the 2D rolls move chaotically in a direction normal to the roll axis. The lateral shift of the rolls may lead to a global flow reversal of the convective motion. The chaotic travelling rolls are observed in simulations with free-slip as well as no-slip boundary conditions on the velocity field. We show that the travelling rolls and the flow reversal are due to an interplay between the real and imaginary parts of the critical modes.