The mechanism involves the addition of amine to dichlorocarbene, a reactive intermediate generated by the dehydrohalogenation of chloroform. Two successive base-mediated dehydrochlorination steps result in formation of the isocyanide.