Classically acyl cyanides are produced by the salt metathesis reaction of acyl chlorides with sodium cyanide:
Alternatively, they can be produced by dehydration of acyl aldoximes:
Acetyl cyanide is also prepared by hydrocyanation of ketene: