PSR B1820-30A is located in the globular cluster NGC 6624 and is the closest known pulsar to the centre of any globular cluster. We present more than 25 yr of high-precision timing observations of this millisecond pulsar and obtain four rotational frequency time derivative measurements. Modelling these higher order derivatives as being due to orbital motion, we find solutions that indicate the pulsar is in either a low-eccentricity (0.33 ≲ e ≲ 0.4) smaller orbit with a low-mass companion (such as a main-sequence star, white dwarf, neutron star or stellar mass black hole) or a high-eccentricity (e ≳ 0.9) larger orbit with a massive companion. The cluster mass properties and the observed properties of 4U 1820-30 and the other pulsars in the cluster argue against the low-eccentricity possibility. The high-eccentricity solution reveals that the pulsar is most likely orbiting around an intermediate-mass black hole (IMBH) of mass >7500 M⊙ located at the cluster centre. A gravitational model for the globular cluster, which includes such a central BH, predicts an acceleration that is commensurate with that measured for the pulsar. It further predicts that the model-dependent minimum mass of the IMBH is ∼60 000 M⊙. Accounting for the associated contribution to the observed period derivative indicates that the γ-ray efficiency of the pulsar should be between 0.08 and 0.2. Our results suggest that other globular clusters may also contain central BHs and they may be revealed by the study of new pulsars found sufficiently close to their centres.