Nucleophilic acyl substitution describe a class of substitution reactions involving nucleophiles and acyl compounds. In this type of reaction, a nucleophile – such as an alcohol, amine, or enolate – displaces the leaving group of an acyl derivative – such as an acid halide, anhydride, or ester. The resulting product is a carbonyl-containing compound in which the nucleophile has taken the place of the leaving group present in the original acyl derivative. Because acyl derivatives react with a wide variety of nucleophiles, and because the product can depend on the particular type of acyl derivative and nucleophile involved, nucleophilic acyl substitution reactions can be used to synthesize a variety of different products.
Carbonyl compounds react with nucleophiles via an addition mechanism: the nucleophile attacks the carbonyl carbon, forming a tetrahedral intermediate. This reaction can be accelerated by acidic conditions, which make the carbonyl more electrophilic, or basic conditions, which provide a more anionic and therefore more reactive nucleophile. The tetrahedral intermediate itself can be an alcohol or alkoxide, depending on the pH of the reaction.
The tetrahedral intermediate of an acyl compound contains a substituent attached to the central carbon that can act as a leaving group. After the tetrahedral intermediate forms, it collapses, recreating the carbonyl C=O bond and ejecting the leaving group in an elimination reaction. As a result of this two-step addition/elimination process, the nucleophile takes the place of the leaving group on the carbonyl compound by way of an intermediate state that does not contain a carbonyl. Both steps are reversible and as a result, nucleophilic acyl substitution reactions are equilibrium processes. Because the equilibrium will favor the product containing the best nucleophile, the leaving group must be a comparatively poor nucleophile in order for a reaction to be practical.