old tools in a garden shed

Tools of the trade: understanding nucleophilic acyl substitution

One of the most important reactions in organic chemistry is nucleophilic acyl substitution. A good leaving group is replaced with a nucleophilic group, to convert one carboxylic acid derivative into another. For example, reaction of an acyl chloride (RCOCl) with ammonia gives a primary amide (RCONH2).

In order for nucleophilic acyl substitution to take place we first need a nucleophile (sometimes called a Lewis base). The nucleophile is an electron-pair donor. For example, a negatively charged ion, such as hydroxide ion HO, or a neutral compound with a lone pair, such as ammonia :NH3).

Next we can identify the site at which the nucleophile attacks. In nucleophilic acyl substitutions this site is the carbon atom directly to the oxygen atom in the carbonyl C=O bond. This carbon atom is electrophilic due to the adjacent oxygen atom being strongly electronegative. The oxygen atom pulls electron density towards itself and away from the carbon atom it is bonded to. Thus producing a dipole moment, or a charge difference, between the two atoms.

In acyl chlorides, the carbonyl carbon is also bonded to a chlorine atom. Chlorine atoms are very electronegative and attract the bonding pair of electrons in the C–Cl bond. Therefore, the carbon atom of the carbonyl is made even more electrophilic (more delta positive) and a good target for an electron-rich nucleophile.

acyl chloride

When the hydroxide ion (the nucleophile) reacts with an acyl chloride (the electrophile) it attacks the carbon of the carbonyl group. The bonding pair of electrons in the C=O bond moves onto the oxygen atom. The double bond then reforms whilst the most stable leaving group, the chloride ion, is removed from the molecule.

carboxylic acid formation

If we use a different nucleophile, namely an excess of ammonia (NH3), then a primary amide is formed. The lone pair on the nitrogen atom of ammonia attacks the electrophilic carbon of the carbonyl and a pair of electrons moves onto the oxygen atom, just as before. However, to form the amide, a second equivalent of ammonia is needed to deprotonate the positively charged nitrogen atom, so that a chloride ion is ejected to re-form the C=O bond.

amide formation

Our amide product still possesses the carbonyl group, as well as being bonded to nitrogen, an atom that is more electronegative than carbon. So, we could assume that the carbonyl carbon in an amide will be electrophilic and so react readily, in further nucleophilic acyl substitutions.

However, in an amide, the lone pair on nitrogen is donated to the more electronegative oxygen atom, to form a C=N bond – the lone pair is stabilised by delocalisation (it is spread over the molecule) and this is represented by a second resonance structure. As the lone pair is pushed towards the carbonyl carbon atom in the amide, the electrophilicity of the carbonyl carbon is significantly reduced (it is less delta positive) and so it is much less reactive to nucleophiles.

amide resonance

From our observations of the stability of amides we might assume that the β-lactam ring of penicillin would not be susceptible to nucleophilic attack. However, delocalisation of a lone pair of electrons, from nitrogen to oxygen, would form a highly unstable molecule. If you have a molecular model kit then try to make a double bond in a four-atom square! You’ll find that this is very difficult and as such would require a considerable amount of energy to achieve. So, unlike normal amides, the β-lactam carbonyl group is much more electrophilic (it is more delta positive) and more susceptible to nucleophilic attack. This helps explain why penicillins can form penicilloic acids, under mild conditions, in an aqueous environment – we will see that their β-lactam ring is broken through a nucleophilic acyl substitution reaction.


There are a wide range of nucleophilic acyl substitution reactions. You might like to see how esters react with organometallics called Grignard reagents – the first step involves a nucleophilic acyl substitution.

Share this article:

This article is from the free online course:

Exploring Everyday Chemistry

University of York