Several thousand solar masses of molecular, atomic and ionized gas lie in the innermost ∼ 10 pc of our Galaxy. The most relevant structure of molecular gas is the circumnuclear ring (CNR), a dense and clumpy ring surrounding the supermassive black hole (SMBH), with a radius of ∼ 2 pc. We propose that the CNR formed through the tidal disruption of a molecular cloud, and we investigate this scenario by means of N-body smoothed-particle hydrodynamics simulations. We ran a grid of simulations with different cloud mass (4 × 10 4 , 1.3 × 10 5 M⊙), different initial orbital velocity (vin = 0.2 − 0.5 vesc, where vesc is the escape velocity from the SMBH), and different impact parameter (b = 8, 26 pc). The disruption of the molecular cloud leads to the formation of very dense and clumpy gas rings, containing most of the initial cloud mass. If the initial orbital velocity of the cloud is sufficiently low (vin < 0.4 vesc, for b = 26 pc) or the impact parameter is sufficiently small (b < ∼ 10 pc, for vin > 0.5 vesc), at least two rings form around the SMBH: an inner ring (with radius ∼ 0.4 pc) and an outer ring (with radius ∼ 2 − 4 pc). The inner ring forms from low-angular momentum material that engulfs the SMBH during the first periapsis passage, while the outer ring forms later, during the subsequent periapsis passages of the disrupted cloud. The inner and outer rings are misaligned by ∼ 24 degrees, because they form from different gas streamers, which are affected by the SMBH gravitational focusing in different ways. The outer ring matches several properties (mass, rotation velocity, temperature, clumpiness) of the CNR in our Galactic centre. We speculate that the inner ring might account for the neutral gas observed in the central cavity.