It is known from recent numerical calculations that Bondi–Hoyle accretion creates a shock cone behind compact objects. This type of accretion leads to instabilities, which can explain certain astrophysical phenomena. In this paper, our main goal is to find the flip-flop behaviour of the shock cone in the relativistic region. In order to do so we have modelled the dynamics of a shock cone around non-rotating and rotating black holes at the equatorial plane in 2D. The effects of the various parameters on the shock cones and instabilities, such as the asymptotic velocity, sound speed, Mach number and adiabatic index, are studied. We have determined the mass accretion rate, shock opening angle, shock cone oscillation, quasi-periodic oscillations (QPOs), and growth rate of instabilities to reveal the disc properties and its radiation. We have discovered, for the first time, flip-flop instabilities around a black hole in the relativistic region by solving the general relativistic hydrodynamical equations. The flip-flop instabilities are found for sound speeds Cs, ∞ < 0.2 with moderate Mach numbers ( and for Cs, ∞ = 0.1 or and for Cs, ∞ = 0.05). Our calculation clearly confirms that the shock cone should be detached from the black hole in the Bondi–Hoyle accretion flow with Γ ≥ 2 for non-rotating and rotating black holes. Results reveal that the flip-flopping shock cone not only creates a torque effect on the black hole but also produces continuous X-ray flares with a certain frequency. Furthermore, QPOs originate inside the shock cone and are stronger in regions that have a radius of a few gravitational radii away from the centre owing to the flip-flop oscillation. Finally, our results are compared with the results of numerical and theoretical calculations in Newtonian hydrodynamics, and it is found that they are in good agreement.