Comets spend most of their lives at large distances from any star, during which time their interior compositions remain relatively unaltered. Cometary observations can therefore provide direct insight into the chemistry that occurred during their birth at the time of planet formation. To-date, there have been no confirmed observations of parent volatiles (gases released directly from the nucleus) of a comet from any planetary system other than our own. Here we present high-resolution, interferometric observations of 2I/Borisov, the first confirmed interstellar comet, obtained using the Atacama Large Millimeter/submillimeter Array (ALMA) on 15th-16th December 2019. Our observations reveal emission from hydrogen cyanide (HCN), and carbon monoxide (CO), coincident with the expected position of 2I/Borisovs nucleus, with production rates Q(HCN)=$(7.0pm1.1)times10^{23}$ s$^{-1}$ and Q(CO)=$(4.4pm0.7)times10^{26}$ s$^{-1}$. While the HCN abundance relative to water (0.06-0.16%) appears similar to that of typical, previously observed comets in our Solar System, the abundance of CO (35-105%) is among the highest observed in any comet within 2 au of the Sun. This shows that 2I/Borisov must have formed in a relatively CO-rich environment - probably beyond the CO ice-line in the very cold, outer regions of a distant protoplanetary accretion disk, as part of a population of small, icy bodies analogous to our Solar Systems own proto-Kuiper Belt.