Carbamoyl chlorides are prepared by the reaction of an amine with phosgene: 
:2 RNH + COCl → RNCOCl + [RNH]Cl
They also arise by the addition of hydrogen chloride to isocyanates:
:RNCO + HCl → RNHCOCl
In this way, carbamoyl chlorides can be prepared with N-H functionality.