Comets are rich in volatile materials, of which roughly 80% (by number) are water molecules. Considerable progress is being made in identifying the other volatile species, the abundances of which should enable us to determine whether comets formed primarily from ice-covered interstellar grains, or from material that was chemically processed in the early solar nebula. Here we report the detection of acetylene (C2H2) in the infrared spectrum of comet C/1996 B2 (Hyakutake). The estimated abundance is 0.3-0.9%, relative to water, which is comparable to the predicted solid-phase abundance in cold interstellar clouds. This suggests that the volatiles in comet Hyakotake may have come from ice-covered interstellar grains, rather than material processed in the accretion disk out of which the Solar System formed.