# Why do SN2 reactions of alkyl halides proceed differently with KCN and AgCN?

Alkyl halides react with $\ce{KCN}$ to form alkyl cyanides as the main product, whereas the use of $\ce{AgCN}$ leads to isocyanides as the chief product. Why does this happen?

• I’m up to answering this as it is a very interesting phenomenon. I probably won’t be able to until in a few days time. In any case let me drop the hint that any argument involving HSAB is wrong. – Jan Aug 28 '16 at 14:28
• @Jan, I didn't see HSAB mentioned by the OP, but its certainly a somewhat plausible argument based on the relative 'hardness' of N vs C nucleophiles. – NotEvans. Aug 28 '16 at 23:02
• might be useful: actachemscand.dk/pdf/acta_vol_25_p2327-2336.pdf – getafix Aug 28 '16 at 23:55
• @NotWoodward Well, I studied at the LMU, Professor H. Mayr’s home university, so HSAB generally has a weak stand when explaining reactivity. Especially in this case, HSAB has been proven wrong, I believe by the Mayr group themselves. – Jan Aug 29 '16 at 11:43

The cyanide anion is an example of an ambident nucleophile, these are nucleophiles which, usually due to delocalisation, are able to attack an electrophile from two or more atoms. In the case of the cyanide anion reaction from carbon leads to nitriles, whilst reaction from the nitrogen leads to isocyanides.

To give the full IUPAC definition from the Gold Book:

A description applied to a chemical species whose molecular entities each possess two alternative and strongly interacting distinguishable reactive centres, to either of which a bond may be made in a reaction: the centres must be connected in such a way that reaction at either site stops or greatly retards subsequent attack at the second site. The term is most commonly applied to conjugated nucleophiles. [...]

To answer your actual question about why $\ce{KCN}$ forms nitriles, whilst $\ce{AgCN}$ forms isocyanides, March's Organic Chemistry (7th ed., p 449) gives a pretty concise answer in which we consider the extent to which the cyanide anion is associated with the counter-cation in solution.

All negatively charged nucleophiles must of course have a positive counterion. If this ion is $\ce{Ag+}$ (or some other ion that specifically helps in removing the leaving group), rather than the more usual $\ce{Na+}$ or $\ce{K+}$, then the transition state is more $\mathrm{S_N1}$ like. Therefore the use of $\ce{Ag+}$ promotes attack at the more electronegative atom. For example, alkyl halides treated with $\ce{NaCN}$ generally give mostly $\ce{RCN}$, but the use of $\ce{AgCN}$ increases the yield of isocyanides ($\ce{RNC}$).

                           [See footnote]


This, of course, is not a complete picture, as solvent effects greatly change the reactivity. In protic solvents (MeOH, to give a possible example) the most electronegative atoms (nitrogen in this case) will be solvated to a greater extent via H-bondng. In aprotic solvents (THF/DMF, to give possible examples) the anion isn't solvated quite so much (on either atom of the nucleophile), but the cation is somewhat more solvated, leaving the nucleophile more able to attack (via the most electronegative atom as this is the most nucleophilic in the absence of other factors).

Footnote: As an aside at this point, it's important to realise that these are not fully covalent bonds (in $\ce{AgCN}$ and $\ce{KCN}$), despite having some level of covalent character. We're somewhat bastardising the Winstein model of nucleophilic substitution in which we define $\mathrm{S_N1}$/$\mathrm{S_N2}$ based upon the separation between the cation and the anion at the point when substitution takes place, with the two mechanisms being extremes of a continuum:

• If you haven’t already, the Mayr review that Jan’s answer cited is worth a read. They don’t mince their words - they basically say that HSAB theory (and the related concept of charge vs orbital control) is a myth and directly criticise a passage from March which is almost the same as what you quoted! Further contradictory observations include the reaction of TBAB cyanide with MeOTf and Me3OBF4, both of which lead to C-methylation, even though both are ‘hard’ methylation game agents. The replacement rationalisation they offer is based on Marcus theory. – orthocresol Dec 19 '18 at 0:44

The different reactivities of $\ce{KCN}$ and $\ce{AgCN}$ with alkyl halide, giving nitriles and isonitriles, respectively, has often been cited as a prime example of Pearson’s hard and soft acids and bases (HSAB) theory. The reasoning was that ‘hard’ electrophiles preferentially attack the ‘hard’ nitrogen centre while ‘soft’ electrophiles prefer the ‘soft’ carbon centre. This was often further explained by a change from an $\mathrm{S_N2}$-type mechanism (with $\ce{KCN}$) to a more $\mathrm{S_N1}$-type mechanism (with $\ce{AgCN}$). This has been challenged multiple times, and a review paper by H. Mayr, M. Breugst and A. Ofial sums up the evidence against it and provides a much more logical explanation.[1]

The first piece of evidence the authors present is the reaction of syn- and anti-2-bromo-3-(methylthio)butane. Thanks to neighbouring group effects, these two reactions all procede via an $\mathrm{S_N2}$-like transition state, yet the products are as expected as shown in scheme 1.

Scheme 1: Reaction of both the syn- and anti-isomers of 2-bromo-3-(methylthio)butane with $\ce{KCN}$ and $\ce{AgCN}$.[2]

Furthermore, Mayr et al. point out that even in cases where an $\mathrm{S_N1}$-like mechanism is impossible, such as the 1-chloroadamantane, isonitrile formation is possible using $\ce{TiCl4}$ and $\ce{TMSCN}$ in dichloromethane.[3]

The authors move on to explain the reactivity of the cyanide anion with their general nucleophilicity scale. In this, two parallel curves are given: one for carbon-attack whose reactivity is generally higher and one for nitrogen attack. They note:

From Figure 5 [sic!] one can extrapolate that the unsubstituted benzhydrylium ion ($E=5.9$), a-alkyl benzyl cations ($E$ ca. $3$ to $9$), and tertiary alkyl cations ($E$ ca. $8$) will undergo barrierless reactions with both termini of the free $\ce{CN}$ ion in acetonitrile.[1]

Thus, explaining the ambident reactivity of cyanide can be done on much simpler grounds. In most cases, the attack of the carbon atom to yield a nitrile is orders of magnitude faster than the attack of the nitrogen atom to yield an isonitrile. This changes once the diffusion barrier is reached for very strong electrophiles when both compounds should be obtained. To generate isonitriles, one needs to block the carbon centre. This can be done by using $\ce{TMSCN}$, where carbon is covalently bound to the $\ce{TMS}$ group’ silicon, or by using silver(I) salts. For these, strong silver-pseudohalide complexes are formed:

$$\ce{AgCN + CN- <=> [Ag(CN)2]-}$$

The strong silver–carbon bond prevents attack of the more reactive carbon centre.

References:

[1]: H. Mayr, M. Breugst, A. Ofial, Angew. Chem. Int. Ed. 2011, 50, 6470. DOI: 10.1002/anie.201007100.

[2]: J. C. Carretero, J. L. Garcia Ruano, Tetrahedron Lett. 1985, 26, 3381. DOI: 10.1016/S0040-4039(00)98303-5.

[3]: T. Sasaki, A. Nakanishi, M. Ohno, J. Org. Chem. 1981, 46, 5445. DOI: 10.1021/jo00339a050.

• I’m reading the Mayr review (your ref 1) now and it’s revelatory. The very first paragraph of the article calls out the exact passage in March quoted in NotEvans’ answer... I don’t want to bounty this as from previous experience it just leads to every answer being upvoted, but I sorta wish there was a way to highlight your answer as being ‘more in line with modern research’. – orthocresol Dec 19 '18 at 0:38

Because of high charge to size ratio of Ag(I), it forms a polar covalent bond with the carbon atom, whereas K(I) forms a purely ionic bond with the carbon atom, so the attack as a nucleophile in AgCN occurs from the available lone pair of the nitrogen atom whereas in KCN the attack takes place from the negatively charged carbon atom which is more nucleophilic. However the reaction(with AgCN) is rendered speed if carried out in a polar protic solvent, and so mentioning of the solvent is extremely important.

• The ionic radius of $\ce{Ag+}$ is between that of $\ce{Na+}$ and $\ce{K+}$ . I hope, there is not doubt that $\ce{NaCN}$ is ionic. – permeakra Aug 28 '16 at 22:34
• Bonds are never purely ionic, especially when the prospective anionic center is a relatively low electronegativity atom like carbon. Ionic bonding is an approximation that is reasonably accurate for some interactions. – Oscar Lanzi Aug 29 '16 at 0:39
• I know that the bond can never be purely ionic, but the electronic effect of K(I) is such that the bond is much more ionic than you think you would predict comparing their relative electronegativities (or by using the Hanny Smith's formula) – Chinmay Dhake Nov 24 '16 at 5:58