Axion-like particles (ALPs) and photons can quantum mechanically interconvert when propagating through magnetic fields, and ALP-photon conversion may induce oscillatory features in the spectra of astrophysical sources. We use deep (370 ks), short frame time Chandra observations of the bright nucleus at the centre of the radio galaxy M87 in the Virgo cluster to search for signatures of light ALPs. The absence of substantial irregularities in the X-ray power-law spectrum leads to a new upper limit on the photon-ALP coupling, gaγ: using a very conservative model of the cluster magnetic field consistent with Faraday rotation measurements from M87 and M84, we find gaγ < 2.6 × 10− 12 GeV− 1 at 95% confidence level for ALP masses ma ≤ 10− 13 eV. Other consistent magnetic field models lead to stronger limits of gaγ 1.1–1.5×10− 12 GeV− 1. These bounds are all stronger than the limit inferred from the absence of a gamma-ray burst from SN1987A, and rule out a substantial fraction of the parameter space accessible to future experiments such as ALPS-II and IAXO.