Delivery of water and organics by asteroid and comet impacts may have influenced prebiotic chemistry on the early Earth. Some recent prebiotic chemistry experiments emphasize hydrogen cyanide (HCN) as a feedstock molecule for the formation of sugars, ribonucleotides, amino acids, and lipid precursors. Here, we assess how much HCN originally contained in a comet would survive impact, using parametric temperature and pressure profiles together with a time-dependent chemistry model. We find that HCN survival mainly depends on whether the impact is hot enough to thermally decompose H2O into reactive radicals, and HCN is therefore rather insensitive to the details of the chemistry. In the most favorable impacts (low impact angle, low velocity, small radius), this temperature threshold is not reached, and intact delivery of HCN is possible. We estimate the global delivery of HCN during a period of Early and Late Heavy Bombardment of the early Earth, as well as local HCN concentrations achieved by individual impacts. In the latter case, comet impacts can provide prebiotically interesting HCN levels for thousands to millions of years, depending on properties of the impactor and of the local environment.